Random color generator
History
Random color generator online
Press Generate or the space bar to pick a random color. You get its HEX, RGB, CMYK and HSL codes, and its name. Click a color to copy the code.
Need more? Choose two, three, five or ten random colors. Lock the ones you like, and Generate changes only the rest. Everything you have seen stays in the history until you reload the page.
Pick a random color by type
| Type | What you get | Examples |
|---|---|---|
| Any color | Any of the 16,777,216 colors | |
| Bright | Strong and clear, for logos, buttons and posters | |
| Pastel | Soft and light, for backgrounds and cards | |
| Dark | Deep, for text and dark themes | |
| Warm | From pink-red to yellow | |
| Cool | From green-blue to violet | |
| With a name | Only colors that have a name, such as Coral |
All of these names are in the list of color names.
Random color palette
Set the number to five, press Generate and lock what works. A few presses later, you have a palette. Copy the codes, download them as an image, or open them as a gradient.
To build a palette around a color you already have, use the color wheel. To take one from a photo, use the color picker from image.
Random HEX code generator
A HEX code is six digits from 0 to F. To make a random HEX color in your own code, one line is enough:
JavaScript'#' + Math.floor(Math.random() * 16777216).toString(16).padStart(6, '0')Python (import random)f'#{random.randrange(16777216):06x}'When a random color helps
Drawing challenges. Three random colors, one picture, no others allowed.
Games with children. Who is first to find something of this color in the room?
Design. A starting point when the page is blank, or a color you would never choose yourself.
Decisions. Nail polish, yarn, a notebook cover: let chance choose.
Testing. See if the text on your site stays readable on any background.
Random color wheel
Would you rather watch it spin? The color wheel has a Spin button: it slows down like a real wheel and stops at a random color.
Frequently asked questions
Can you give me a random color?
Yes. One is at the top of this page, and every press of Generate gives you another.
How do I pick two or three random colors?
Click 2 or 3 under the list of types. The colors in a set never repeat.
How do I get random color names?
Choose "With a name". The tool then picks only from the 1,636 colors that have one, such as Coral or Navy Blue.
Are the colors really random?
Yes. The numbers come from your browser's cryptographic generator, the kind made for passwords and keys. With "Any color", every color has the same chance. The other types pick from their own part of the range.
How many colors are there?
A screen color mixes 256 levels each of red, green and blue, which makes 16,777,216. Most of them have no name.
Why do many random colors look dull?
Because most of the 16.7 million are: vivid, light ones make up only about a quarter. Choose Bright if you want just those.