How to use the Random Color Generator
- Press Space or click Generate.
- Choose a style (any, pastel, vivid, dark, light or grayscale) and how many colors.
- Click a color to copy it. Lock colors you like to keep them while generating the rest.
Random Color Generator features
- Generate 1, 3, 5, 8 or 12 colors at once with the space bar
- Pastel, vivid, dark, light and grayscale styles
- Limit results to a hue: red, orange, yellow, green, cyan, blue, purple or pink
- Lock colors to keep them while the rest change
- HEX, RGB, HSL and the closest CSS color name for each color
- Cryptographically secure randomness; every color saved to your history
Generate random colors with one key
Stuck on a color choice? The random color generator gives you fresh colors every time you press Space or click Generate. Each color comes with its HEX, RGB and HSL code and its closest CSS color name, and you can copy any of them with a click. Generate a single random color, or 3, 5, 8 or 12 at a time to explore combinations.
Unlike a plain random number, the generator can be steered. Choose a style and a hue range, and every result stays within them, so you get random colors that are actually usable.
Choose a style
| Style | What you get | Good for |
|---|---|---|
| Any | Colors from the whole sRGB range | Pure inspiration and surprises |
| Pastel | Light, soft, low-saturation colors | Baby showers, spring themes, gentle UI backgrounds |
| Vivid | Bright, highly saturated colors | Posters, sports branding, playful designs |
| Dark | Deep colors that work behind white text | Dark mode, headers, buttons |
| Light | Pale colors that work behind dark text | Cards, highlights, backgrounds |
| Grayscale | Neutral grays from near-black to near-white | Neutral palettes, testing layouts |
Combine a style with a hue, such as red, orange, yellow, green, cyan, blue, purple or pink, to get random pastel pinks, dark blues or vivid greens.
Lock the colors you like
When a color catches your eye, lock it with the padlock button. Locked colors stay in place while the others keep changing, so you can build up a combination one color at a time. This is a quick way to find a random color palette that you would never have picked on purpose.
For more control, such as harmony rules, adding and reordering colors, a website preview and saved palettes, switch to the Color Palette Generator.
Is it really random?
Yes. Colors are created with your browser's cryptographically secure random number generator, the same source used for passwords and encryption keys, within the limits of the style and hue you choose. Every color that is generated is also added to your color history on this device, so a color you skipped past by accident is never lost.
Creative ways to use random colors
- Break a creative block. Generate until something feels right, then refine it in the Color Picker.
- Placeholder and test data. Give avatars, tags or chart series distinct random colors while you prototype.
- Art and drawing challenges. Generate three colors and create something using only those.
- Games and classrooms. Pick a random color for a team, a quiz or a color-naming game.
- Generative design. Find a mood with a style and hue range, then use those values in your code.
Make a random color work
Found a color you love? Check whether text on it is readable with the Contrast Checker, find its best partner with the Complementary Colors, or get its lighter and darker versions from the Shades & Tints Generator.
Random Color Generator: frequently asked questions
Are the colors truly random?
They are generated with the browser's cryptographically secure random number generator within the ranges of the style you choose.
Can I get the same palette again?
Every generated color is saved in your color history on this device, so you can find it again later.
How do I generate a random pastel color?
Choose the Pastel style and press Space. Add a hue, such as pink or blue, to get random pastels of that color only.
How do I get a random hex color code?
Press Space or Generate. Each color shows its hex code; click it to copy.
Can I keep one color and randomize the others?
Yes. Click the padlock on the colors you want to keep. Locked colors stay in place every time you generate.