Skip to content

DMS-Menula/random-gradient-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 random-gradient-css

npm version downloads

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-css

Example 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

About

Generate beautiful random CSS gradients instantly for your projects.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors