Skip to content
TextArray
100% local

Random color generator

Generate random colors as HEX, RGB or HSL, with light, dark, pastel and vivid palettes.

Output

Random color generator

Generate anywhere from one to a hundred random colors in a single click. Each color lands on its own line as a HEX value, an rgb() or hsl() notation, or all three side by side, so you can paste the output straight into CSS, a design token file, a chart configuration or a spreadsheet. Changing the count, format or palette recomputes the list instantly.

Random colors are useful more often than it seems: placeholder backgrounds for cards and avatars, distinct series colors for a quick chart, seed values for a mood board, test data for a theming system, or simply a way out of a creative rut. Because a color drawn uniformly from the full RGB cube is usually muddy, this generator works in HSL space instead and constrains saturation and lightness per palette: Light keeps lightness between 70 and 90 percent, Dark stays between 10 and 35, Pastel pairs a soft saturation of 25 to 45 percent with high lightness, and Vivid pushes saturation to 85 to 100 percent at medium lightness. Any removes the constraints entirely.

Include alpha adds a random opacity to every color and prints it in each notation — an 8-digit HEX value, rgba() and hsla(). One color per line means the output plugs directly into the color converter or the contrast checker whenever you want to inspect a value further.

Everything runs locally in your browser: no request is sent, nothing is logged, and the randomness comes from the cryptographically secure crypto.getRandomValues, sampled with rejection so every value in a range is equally likely.

FAQ

Are the colors uploaded anywhere?
No. They are generated entirely in your browser and never leave your device. Nothing is sent, stored or logged.
How random are the colors?
Hue, saturation and lightness are drawn with the cryptographically secure crypto.getRandomValues, using rejection sampling so there is no modulo bias — every value in a range is equally likely.
Why does the tool generate in HSL instead of RGB?
HSL separates hue from saturation and lightness, so a palette like "pastel" or "vivid" is just a constraint on two numbers. Each color is then converted to RGB and HEX with plain math, so all three notations describe exactly the same color.
What does "Include alpha" do?
It gives every color a random opacity between 0 and 1 and prints it in each notation: an 8-digit HEX value, rgba() and hsla().
Can I convert a generated color to another notation?
Pick "All three" to see HEX, RGB and HSL side by side, or paste any line into the color converter for uppercase hex, modern syntax and tint palettes.