Home/Calculators/Color Tools/HSL to Hex Converter

HSL to Hex Converter

Dial in a colour by hue, saturation and lightness, then take the hex code your design tool actually wants.

hsl-to-hex
Result
—
In summary: hsl(11, 100%, 60%) is about #FF5833 — rgb(255, 88, 51). HSL is the comfortable way to pick a colour, but most style guides, Figma fields and CSS tokens still store hex, so this converter closes the loop between the two notations.

How the maths works

Start with chroma, C = (1 - |2L - 1|) × S — the colourfulness available at that lightness. A second term X handles the ramp between the two dominant channels, and m = L - C/2 lifts everything to the right brightness. The hue then selects which of six 60° sectors of the wheel you are in, and that decides which channel gets C, which gets X and which gets zero. Finally each channel is scaled to 0-255 and printed as two hex digits.

Plenty of people keep the hex to RGB converter open alongside this one.

Rounding is normal

Hex has only 256 steps per channel, so an HSL triple almost never lands on an exact byte. Converting hsl(11, 100%, 60%) and back through the RGB to HSL converter can shift a degree of hue or a percent of lightness. That is expected and invisible on screen — treat hex as the storage format and HSL as the editing format.

Try the colour picker when you want the outcome decided a different way.

Building a scale

Fix hue and saturation, then step lightness from about 95% down to 10% and you have a full palette ramp from tint to shade with one consistent hue. The tint and shade generator does exactly that automatically if you would rather start from a hex code.

Because hue and saturation stay fixed, the whole ramp reads as one colour family; check the darkest steps against white for the 4.5:1 AA threshold, or 7:1 if you need AAA.

Frequently asked questions

What hex is hsl(11, 100%, 60%)?
Roughly #FF5833, which is rgb(255, 88, 51) — a warm coral orange.
Why does the hex differ by one from another tool?
Different tools round the final channel value slightly differently. A one step difference is imperceptible.
What if saturation is 0%?
You get a neutral grey whose brightness depends only on lightness — hue is irrelevant.
Can hue be over 360?
Yes. Hue wraps around the wheel, so 380 is treated the same as 20.
Is anything I enter sent to a server?
No — the conversion runs entirely in your browser with JavaScript, so the values you type are never uploaded, logged or stored. Nothing is remembered between visits either, so copy the hex code before you close the tab.
How this tool works

The formula behind this tool is written out in full in the sections above, so you can check the maths yourself. Every calculator on Calculorium is verified against worked examples with automated tests before it is published, and pages are reviewed as formulas or standards change. Nothing you type is sent anywhere — the calculation runs entirely in your browser. Read how we build and check these tools.

Last updated: October 2, 2026 · Calculations run in your browser. Estimates for information only.