Truly random, or random within limits
Press Generate or the spacebar and you get fresh colors. With the filter on Any color and the hue range at its full 0–360°, each color is a uniformly random 24-bit value: any of the 16,777,216 HEX codes is equally likely. The randomness comes from your browser's crypto.getRandomValues, the same cryptographically secure source used for passwords and keys, not the weaker Math.random.
Pure randomness is rarely what you want for design, though. Uniform RGB rolls give you plenty of murky olives, browns and grayish mid-tones next to the occasional gem. The filters steer every roll toward one style.
Filters
The filters pick a random hue, then pick lightness and chroma from a range in OKLCH, a perceptual color space. The results look consistent within each style:
| Filter | OKLCH lightness | Chroma | Feels like |
|---|---|---|---|
| Pastel | 0.84–0.93 | 0.04–0.09 | nursery walls, spring packaging |
| Dark | 0.20–0.38 | 0.03–0.12 | moody backgrounds, dark mode |
| Neon / vivid | 0.62–0.90 | 0.20–0.32 | festival posters, highlighters |
| Muted | 0.45–0.75 | 0.02–0.07 | earthy, editorial, calm |
| Grays only | 0.15–0.95 | 0 | neutral ramps |
Chroma is capped at what sRGB can display, so very vivid picks at some hues are pulled back to the nearest color a screen can show.
Hue range narrows the hue. Set it to 180–260° for blues and teals only, or put the start higher than the end, such as 330 to 30, to wrap around through red. The label shows the range in words.
Palettes, locks and history
Set How many from 1 to 10 to roll a set of colors at once. Each card has:
- Copy, which puts the HEX code on your clipboard;
- Lock, which keeps that color through later rolls, so you can build a palette one color at a time.
Every roll is added to the History strip (up to 60 colors), stored only in your browser's local storage. Click a history swatch to copy it. Clear empties the strip.
Each card also shows the nearest color name, which is surprisingly good at making a random color feel like a choice.
What people use it for
- Breaking creative block. Roll until something surprises you, then build around it in the palette generator.
- Placeholder and test data: avatar backgrounds, chart series and sample tags. Pastels and muted colors make good avatar fills behind dark initials.
- Games and classroom activities: name the color, guess the HEX code, or match it by eye in the color game.
- Generative art: a filtered range gives variety that still hangs together.
Random colors for charts and tags
Random picks are tempting for chart series and category tags, but two random colors can easily land close together. Roll the set you need, then check it:
- Look for near twins. If two cards could be mistaken for each other at a glance, lock the rest and reroll one of them.
- Keep lightness varied. Rolling with the Muted filter, then mixing in one roll from Dark, gives series that stay apart even when printed in grayscale.
- Check for color blindness. About one man in twelve has some red-green deficiency. Paste your colors into the color blindness simulator before shipping a chart.
For more than six or seven series, color alone stops working whatever you roll; add labels, patterns or direct annotations.
Is it fair?
In unfiltered mode, yes. A 32-bit secure random value is scaled down to the range 0–16,777,215, so every HEX code has the same chance. In filtered modes the hue is uniform within the range you set. Lightness and chroma are uniform within the filter's bounds, so the distribution is even in OKLCH terms, not in RGB terms. That's by design: it makes a "pastel" roll look like a pastel every time.
Related tools
To pick colors deliberately instead, use the HEX color picker. To find out what a random color is called, use the color name finder. For a random two-color blend, the gradient generator has a Random button.
FAQ
Can I get the same random color again?
Only from the history strip. Secure random numbers can't be seeded or repeated by design.
How do I generate a random color in code?
In JavaScript: '#' + crypto.getRandomValues(new Uint32Array(1))[0].toString(16).slice(-6).padStart(6, '0'). In Python: '#%06X' % random.randrange(16**6).
Why do I keep getting similar colors?
Your eyes group many different codes into the same family. Mid blues, for example, cover a huge number of codes. Narrow or move the hue range for more obvious variety.