chroma-gen
v1.0.3
Published
A Versatile Random Color Generator for npm
Readme
chroma-gen
A Versatile Random Color Generator for npm
Description
chroma-gen is a powerful npm package that simplifies the generation of random colors in various formats, including:
- Hex (e.g.,
#FFFFFF) - Hexa (same as Hex, with alpha channel, e.g.,
#FFFFFF80) - HSL (Hue, Saturation, Lightness, e.g.,
hsl(0, 100%, 50%)) - HSLA (HSL with alpha channel, e.g.,
hsla(0, 100%, 50%, 0.5)) - RGB (Red, Green, Blue, e.g.,
rgb(255, 255, 255)) - RGBA (RGB with alpha channel, e.g.,
rgba(255, 255, 255, 0.5))
Installation
You can easily install chroma-gen using npm:
npm install chroma-genUsage
const chromaGen = require("chroma-gen");
const randomColor = chromaGen(); // Generates a random color in hex format by default
console.log(randomColor);When no arguments are passed, chroma-gen will generate a random color in hex format by default. You can specify the desired color format by passing one of the following parameters: hex, hexa, rgb, rgba, hsl, hsla.
Credits
chroma-gen was created and is maintained by Jayaram s kumar.
Contact
If you have any questions or suggestions, feel free to reach out to me at [email protected]
