Generate beautiful random CSS gradients instantly for your projects.
🔥 Lightweight • 🎯 Easy to use • ⚡ No dependencies
npm install random-gradient-cssconst gradient = require("random-gradient-css");
const result = gradient();
console.log(result.css);
// linear-gradient(120deg, #ff7e5f, #feb47b){
css: "linear-gradient(210deg, #ff7e5f, #feb47b)",
colors: ["#ff7e5f", "#feb47b"],
angle: 210,
type: "linear"
}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"
});- pastel
- neon
- sunset
- dark
- ocean 🌊
- forest 🌲
- fire 🔥
- ice ❄️
- candy 🍭
- gold 🟡
- sky ☁️
- peach 🍑
- aurora 🌌
- galaxy 🚀
- lava 🌋
- mint 🌿
- royal 👑
Run directly in terminal:
npx random-gradient-cssExample output:
🎨 Random Gradient:
linear-gradient(135deg, #ff416c, #ff4b2b)
Colors: #ff416c, #ff4b2b- 🎨 Website backgrounds
- 🧩 UI components
- 🎯 Landing pages
- 🎬 Design tools
- ⚡ Rapid prototyping
- No dependencies
- Super lightweight
- Multiple color modes
- Clean & modern gradients
- CLI support
Made by Menula 🚀
MIT