random-gradient-css
v1.0.0
Published
Generate beautiful random CSS gradients (linear & radial) with presets, HSL, and mixed modes
Maintainers
Readme
🎨 random-gradient-css
Generate beautiful random CSS gradients instantly for your projects.
🔥 Lightweight • 🎯 Easy to use • ⚡ No dependencies
🚀 Installation
npm install random-gradient-css⚡ Quick Usage
const gradient = require("random-gradient-css");
const result = gradient();
console.log(result.css);
// linear-gradient(120deg, #ff7e5f, #feb47b)🎯 Example Output
{
css: "linear-gradient(210deg, #ff7e5f, #feb47b)",
colors: ["#ff7e5f", "#feb47b"],
angle: 210,
type: "linear"
}🛠 Options
gradient({
colors: 3, // number of colors (default: 2)
angle: 90, // gradient angle
preset: "sunset", // color preset
mode: "mixed", // "hex" | "hsl" | "mixed"
type: "radial" // "linear" | "radial"
});🎨 Available Presets
- pastel
- neon
- sunset
- dark
- ocean 🌊
- forest 🌲
- fire 🔥
- ice ❄️
- candy 🍭
- gold 🟡
- sky ☁️
- peach 🍑
- aurora 🌌
- galaxy 🚀
- lava 🌋
- mint 🌿
- royal 👑
🖥 CLI Usage
Run directly in terminal:
npx random-gradient-cssExample output:
🎨 Random Gradient:
linear-gradient(135deg, #ff416c, #ff4b2b)
Colors: #ff416c, #ff4b2b💡 Use Cases
- 🎨 Website backgrounds
- 🧩 UI components
- 🎯 Landing pages
- 🎬 Design tools
- ⚡ Rapid prototyping
🌟 Why use this?
- No dependencies
- Super lightweight
- Multiple color modes
- Clean & modern gradients
- CLI support
🧑💻 Author
Made by Menula 🚀
📄 License
MIT
