Random Color Generator
Roll cryptographically random colors in hex, rgb() or hsl() form. Constrain the result to a style such as pastel, vivid, grayscale or earth tones using HSL ranges.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
Random colors straight from the browser CSPRNG
Each color starts as a random hue, saturation and lightness drawn with crypto.getRandomValues, then converted to the output format. Ask for 1 to 48 colors and they appear as a swatch strip plus a plain list. Formats are #rrggbb hex, rgb(r, g, b) and hsl(h, s%, l%).
When a random palette helps
Use it to break out of the same three colors you always reach for: roll a set for a chart series, a user avatar, a placeholder while a design is undecided, or a starting point for a brand exploration. Grayscale rolls are handy for testing a layout where color should not carry meaning.
What the style ranges constrain
Warm limits the hue to 0–60 or 300–360 degrees; cool uses 180–300. Pastel keeps lightness high around 80–92% with low saturation, vivid pushes saturation to 80–100%, earth stays in a muted 20–45 degree band, and grayscale drops saturation to zero so lightness alone varies.
No seeds, no contrast checks
There is no seed, so a run cannot be replayed exactly and two runs will differ. The styles constrain hue, saturation and lightness only; they promise nothing about contrast against a background, so check WCAG ratios yourself. The text box on the page is not read by the generator; the count, format and style options decide the result.
Generated locally
Randomness comes from the browser cryptographic generator and the conversion runs in this tab, so no palette is requested from a server and nothing you do here is uploaded or logged.
Questions
Are the colors truly random?
Yes - they come from the browser cryptographic random number generator (crypto.getRandomValues), not a seeded pseudo-random generator.
Can I reproduce the same sequence later?
No. Every value is drawn fresh from the browser cryptographic generator, so there is no seed to set and a second run gives different colors. Copy the output if you need a fixed list.
Do the styles guarantee readable contrast?
No. Warm, cool, pastel, vivid, earth and grayscale only constrain hue, saturation and lightness ranges; they say nothing about contrast against a particular background, so check WCAG contrast when pairing text with a generated color.
Related tools
See categoryColor Palette Generator
Generate tints, shades, complementary, triadic and analogous color palettes.
Fake Data Generator
Generate realistic fake datasets — people, contacts, addresses, products — as JSON, CSV or SQL.
Color Blender
Mix two colors in RGB or HSL space with a 0-100% blend ratio.
Color Blindness Simulator
Simulate protanopia, deuteranopia, tritanopia and achromatopsia on your colors.