Random Color Generator
The random color generator produces five colours at a time in hex, RGB and HSL. Four ranges are available (any, vivid, pastel and dark) because a fully random colour is usable for almost nothing, while a constrained range produces colours you can actually put in a design.
How it works
Colours are generated in HSL and converted, because constraining saturation and lightness in HSL is straightforward while doing the same in RGB is not.
- Any: hue 0-359, saturation 0-100, lightness 0-100. Includes near-blacks, near-whites and greys.
- Vivid: saturation 75-100, lightness 42-57. Strong colours suitable for accents.
- Pastel: saturation 25-54, lightness 78-89. Light, low-contrast colours for backgrounds.
- Dark: saturation 30-79, lightness 12-31. Deep colours suitable for text or dark surfaces.
Examples
Vivid colours
Range
Vivid
Result
#d92b4f · rgb(217, 43, 79) · hsl(347, 70%, 51%)
Saturation and lightness are constrained to a narrow band, so the five results differ mainly in hue and read as a coherent set.
Unconstrained colours
Range
Any
Result
Five colours including, typically, at least one near-grey or near-black
With lightness free to reach the extremes, some draws produce colours that are almost black or almost white. That is correct behaviour for an unconstrained draw and the reason the other three ranges exist.
Frequently asked questions
Why does the "any" range keep producing greys and near-blacks?
Because it is genuinely uniform across saturation and lightness. Low saturation gives grey and extreme lightness gives near-black or near-white, and together those account for a large share of the colour space. Most people asking for a random colour want the vivid range.
What is the difference between hex, RGB and HSL here?
They are three notations for the same colour, and the tool shows all three of each. Hex and RGB describe how much red, green and blue to mix; HSL describes hue, saturation and lightness, which is far easier to adjust by hand.
Do the generated colours have enough contrast for text?
Not reliably, and the tool makes no claim about it. Contrast depends on the pair, not the colour. A vivid mid-tone can fail against both white and black. Check any text pairing against a 4.5:1 target before using it.
How is this different from the colour palette generator?
This produces five unrelated colours. The palette generator takes one base colour and derives four more from it using a harmony rule, so the five belong together. Use this for exploring, that for building a scheme.