← All tools/Generators/Design/Random Color Generator
Random Color Generator
Random colours with HEX, RGB, HSL and CMYK codes and the nearest colour name.
Colours are drawn with your browser’s secure random number generator. Nothing is uploaded.
First colour
How it works
Draw = pick a hue, saturation and lightness to match the style, then convert to red, green and blue (each 0–255). Pastel = low saturation, high lightness. Vibrant = high saturation. Dark = low lightness. Light = high lightness. Grayscale = equal red, green and blue. HEX = #RRGGBB, two hex digits per channel. HSL and CMYK are worked out from the same RGB values. Name = the nearest of about 40 common colour names, by straight-line distance in RGB space.
Worked example: One draw gave red 255, green 87, blue 51 — HEX #FF5733, rgb(255, 87, 51), hsl(11, 100%, 60%), cmyk(0%, 66%, 80%, 0%). Its nearest common name is tomato, the closest of the built-in names in RGB space.
Frequently asked questions
What do HEX, RGB, HSL and CMYK mean?
They are four ways to write the same colour. HEX is the six-digit code websites use, RGB lists the red, green and blue amounts, HSL lists hue, saturation and lightness, and CMYK lists the ink amounts printers use.
How is the nearest colour name found?
The tool measures the straight-line distance between your colour and each of about 40 common named colours in RGB space, and picks the closest one. A colour between two names takes the nearer of the two.
What is the difference between pastel and vibrant?
Pastel colours are pale and soft — low saturation with high lightness. Vibrant colours are bold and saturated, with strong hue and medium lightness.
Can I use these colours in my design?
Yes. Copy the HEX code straight into your CSS, design tool or presentation. The codes are standard, so they work anywhere a colour value is accepted.
Are the colours really random?
Yes. Each colour is drawn with crypto.getRandomValues(), the browser’s secure random source, so no two batches are the same and nothing is decided in advance.
More tools
Tell us what you think
Loving this tool, or stuck on something? Tell us — it takes a minute.
We’ll only use your name and email to reply if needed. The tool and page are filled in for you.