Accessible Color Generator
Nudge a colour until it passes WCAG, keeping its hue.
Convert HSL to HEX and back, with the maths written out.
The hex code appears here
The HSL to HEX Converter moves between the notation you think in and the notation you paste, in both directions, with sliders for hue, saturation and lightness and alpha handled as an eight-digit HEX code.
HSL is the notation you think in — hue as an angle on the colour wheel, saturation and lightness as percentages — and HEX is the notation you paste into a stylesheet or a design tool. This converts between them in both directions.
Three sliders drive the conversion, so you can find a colour by feel rather than by guessing numbers, and the HEX updates as you drag. Going the other way, paste a HEX code and the sliders move to match.
Alpha is handled in both directions: an HSLA value with an alpha channel becomes an eight-digit HEX, which every current browser understands. The conversion itself is shown step by step, because HSL to RGB is one of the few colour conversions that is genuinely awkward to do by hand and useful to see once.
Drag hue, saturation and lightness and watch the HEX update, rather than typing numbers and checking.
Paste a HEX code and the sliders move to match it, so an existing colour can be adjusted rather than replaced.
An HSLA value becomes an eight-digit HEX, which every current browser reads.
HSL to RGB is genuinely awkward by hand, and worth seeing once written out.
RGB and the rest are produced alongside, each with its own copy button.
Drag hue, saturation and lightness, or type an hsl() string straight in.
The six-digit code updates live, with an eight-digit version when alpha is below 1.
Paste a HEX code and the sliders and percentages move to match it.
RGB and the other notations are produced alongside, each with a copy button.
Because HSL lightness is a geometric position in the RGB cube, not a measure of perceived brightness. hsl(60 100% 50%) is yellow and very bright; hsl(240 100% 50%) is blue and very dark. OKLCH exists to fix this.
Nothing — it becomes meaningless. Every hue at 0% saturation is the same grey, so the hue is preserved in the notation but has no effect on the colour.
Yes, as eight digits: the last pair is the alpha channel, 00 transparent to FF opaque. It has been supported in every major browser for years.
Both. The comma form is the original syntax and the space-separated form is the modern CSS Color 4 one. Browsers accept either; the space form is what new code should use.
What people who use the HSL to HEX Converter 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 HSL to HEX Converter. It takes half a minute and no account.
Write the first reviewNudge a colour until it passes WCAG, keeping its hue.
Build a duotone pair and get the CSS to apply it.
Blend two colours and see every step between them.
See your palette as a real interface instead of swatches.
Put a gradient on a border — and keep the rounded corners.
Check any text and background pair against WCAG AA and AAA.
The RAL Classic chart, searchable, with screen approximations.
Check whether a colour code is valid, and fix it if not.