Discover colors with the random color generator
Sometimes the best way to find a color is to stop choosing and look at options you would never have picked. This random color generator creates colors by choosing the red, green and blue channels independently from 0 to 255, which covers all 16.7 million colors a standard screen can display. Each result is shown as a swatch next to its code.
Output formats
HEX: #3E8FB0
RGB: rgb(62, 143, 176)
HSL: hsl(197, 48%, 47%)- HEX – six hexadecimal digits for red, green and blue. The most common format in CSS and design tools.
- RGB – the same channels as decimal numbers 0–255, convenient for code and image libraries.
- HSL – hue (0–360°), saturation and lightness. HSL is the easiest format to adjust by hand: keep the hue and change lightness to get tints and shades of the same color.
Practical uses
- Design inspiration – generate a dozen colors and keep the one that sparks an idea.
- Placeholder avatars and tags – assign each user or category a color in a prototype.
- Chart series – quickly get distinct colors for test charts (for final charts, choose a palette with sufficient contrast).
- Testing – check that your UI handles any background color, including very dark and very light ones, and that text stays readable.
- Games and art – random colors for generative art, particle effects or game prototypes.
Making random colors usable
Uniformly random RGB colors are often muddy or too saturated to use as is. A few tricks help:
- Convert a color you like to HSL, then vary only the lightness to create a harmonious set of tints.
- For readable text, check the contrast ratio: WCAG recommends at least 4.5:1 for normal text against its background.
- Generate in bulk and pick the few that work together, rather than using the first result.
Options
Generate from 1 to 1,000 colors per run. The swatch grid lets you scan a large batch at a glance, while Copy all and Download give you the codes one per line, ready to paste into a stylesheet, a design token file or an array in your code.
Convert and fine-tune
To move a color between formats, including CMYK for print, use the color converter. For a single conversion, HEX to RGB and RGB to HSL are quick options. Colors are generated with a secure random source in your browser and are not stored.