HSL to HEX Converter
Convert HSL to HEX and back, with the maths written out.
Generate random colours you would actually use.
Press the space bar to generate again.
The colours appear here
The Random Color Generator constrains the randomness to the part of the colour space worth using — hue range, saturation and lightness bounds — because picking three random bytes gives you mud far more often than a colour.
Truly random colours are not very useful. Picking three random bytes gives you a muddy near-grey most of the time, because the vast majority of the RGB cube is exactly that, and the few that are not are usually unusable.
So this generator lets you constrain the randomness to the part of the space you want. Limit the hue to a range — warm, cool, or one narrow band — and set the saturation and lightness bounds, and every colour it produces will be one you could actually put in a design.
It generates single colours or whole palettes, and the palette mode understands that randomness alone does not make a palette. Colours can be spread evenly around the wheel, kept within a hue family, or built from a random base using the classical harmonies. Every result comes with its HEX, RGB and HSL values, and the whole set copies or exports in one go. Pressing the space bar generates again, which is the only way to browse this sort of thing at any speed.
Limit the hue range and the saturation and lightness bounds, so every result is usable rather than most of them being grey.
Generate a whole set spread around the wheel, kept in one hue family, or built on a classical harmony.
The only sensible way to browse forty colours in a row.
HEX, RGB and HSL for each colour, and the whole palette copies in one go.
Pastel, vivid, muted, dark and earth-tone ranges already set up, as a starting point rather than a limit.
A single colour, or a palette of up to ten.
Hue range, saturation and lightness bounds — or leave them wide open.
Hit the button or press the space bar until something catches your eye.
Click any swatch for its HEX, or copy the whole palette at once.
Because most of the RGB cube is desaturated mud. Only a thin shell of it holds the vivid colours people think of as colours, so picking uniformly from the whole volume almost never lands there.
Set saturation to roughly 25–50% and lightness to 80–92%. Leave hue unconstrained — pastels work across the whole wheel, which is what makes them easy.
They come from the browser Math.random, which is a pseudorandom generator — fine for choosing a colour, not suitable for anything where randomness has to be unpredictable, such as a key.
Copy it before generating again. There is no seed, because a seed field on a tool people click forty times in a row is more friction than it is worth.
What people who use the Random Color Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Random Color Generator. It takes half a minute and no account.
Write the first reviewConvert HSL to HEX and back, with the maths written out.
Check any text and background pair against WCAG AA and AAA.
Generate matching light and dark themes from one colour.
Build a duotone pair and get the CSS to apply it.
Put a gradient on a border — and keep the rounded corners.
Pick any colour and copy it as HEX, RGB, HSL or CSS.
Fill headline text with a gradient, and keep it selectable.
Score every colour in a palette against every other one.