Skip to content
hexcolorcodepicker.com

HEX to HSL Converter

HSL values

hsl(217, 91%, 60%)

Hue 217° · Saturation 91% · Lightness 60%

Saturation91%

Lightness60%

Paste a HEX code and get its HSL values instantly. Free HEX to HSL converter with hue, saturation, and lightness shown, plus a live preview — copy in one click.

What is HEX to HSL conversion?

HEX to HSL conversion turns a HEX code into a hue, a saturation, and a lightness. HEX says what the color is as three channel values, while HSL says what it looks like: hue is the color family on a 0 to 360 degree wheel, saturation is how vivid it is as a percentage, and lightness is how light or dark it is as a percentage. The converter reads the HEX code and gives you all three.

HSL is the format designers reach for when they need to adjust a color. Lightening a button for a hover state means raising the lightness and keeping the hue, and muting a color means lowering the saturation. HEX cannot say that directly, so converting to HSL is the step that makes a color adjustable.

#3B82F6

hsl(217, 91%, 60%)

Saturation91%

Lightness60%

Worked example: #3B82F6 = hsl(217, 91%, 60%)

The HEX code #3B82F6 converts to hsl(217, 91%, 60%). Its RGB values are 59, 130, and 246, and the hue of 217 degrees sits in the blue range, the saturation of 91% is very vivid, and the lightness of 60% is a little above halfway. It is a clear medium blue, and the same conversion appears as a worked example across several ranking pages.

The hue comes from which channel is largest — here blue, at 246 — and how far the other two channels sit from it. The lightness is the average of the largest and smallest channels, and the saturation measures how far apart the largest and smallest are. The tool does the arithmetic; the worked numbers below show the steps in plain language.

Hue 217°

blue range

Saturation 91%

very vivid

Lightness 60%

above halfway

RGB (59, 130, 246) → hsl(217, 91%, 60%)

Worked example: #3b5bdb = hsl(228, 69%, 55%)

The HEX code #3b5bdb converts to hsl(228, 69%, 55%). Its RGB values are 59, 91, and 219, and the hue of 228 degrees is a deeper blue than the last example, the saturation of 69% is strong but less vivid, and the lightness of 55% is just above halfway. It is a strong indigo blue, darker and less electric than #3B82F6.

Compare the two blues and the HSL numbers explain the difference your eye sees. The hue moved from 217 to 228 degrees, so the color shifted toward violet; the saturation fell from 91% to 69%, so it looks less intense; and the lightness fell from 60% to 55%, so it looks darker. HEX codes cannot say any of that — HSL can.

#3B82F6

217° · 91% · 60%

#3B5BDB

228° · 69% · 55%

Hue 217° → 228° (toward violet) · saturation 91% → 69% · lightness 60% → 55%.

Worked example: #FF5733 = hsl(11, 100%, 60%)

The HEX code #FF5733 converts to hsl(11, 100%, 60%). Its RGB values are 255, 87, and 51, and the hue of 11 degrees sits just past red toward orange, the saturation of 100% is as vivid as a color can be, and the lightness of 60% is a little above halfway. It is a bright coral-orange used for buttons and highlights.

The saturation of 100% is worth pausing on: it means the smallest channel is as far from the largest as it can be for that lightness, so no gray is mixed in at all. A hue of 11 degrees with full saturation is why the color looks so loud next to a muted blue. Lowering the saturation to 50% would give the same hue in a dusty, muted orange.

Hue 11°

past red, toward orange

Saturation 100%

as vivid as possible

Lightness 60%

above halfway

RGB (255, 87, 51) → hsl(11, 100%, 60%)

How the conversion works, in plain language

To convert HEX to HSL, first read the HEX code as RGB, then find the largest and smallest channels. Divide each RGB value by 255 so all three sit between 0 and 1. Lightness is the average of the largest and smallest values, times 100. Saturation measures how far apart the largest and smallest are, relative to the lightness. Hue depends on which channel is largest, and it is measured in degrees around the color wheel.

Take #3B82F6 as the example: the channels divided by 255 are about 0.23, 0.51, and 0.96, so the largest is 0.96 and the smallest is 0.23. Lightness is the average of those two, about 0.60, or 60%. Blue is the largest channel, so the hue formula for a blue-maximum color gives about 217 degrees. Saturation comes out at about 91%. The tool shows the rounded whole numbers.

  1. 1. HEX to RGB: #3B82F6 → 59, 130, 246
  2. 2. Divide by 255: 0.23, 0.51, 0.96
  3. 3. Largest 0.96, smallest 0.23: lightness = (0.96 + 0.23) ÷ 2 = 60%
  4. 4. Blue is largest: hue ≈ 217° · saturation ≈ 91%

Rounded whole numbers: hsl(217, 91%, 60%)

Why HSL is better for adjusting a color

HSL is better for adjusting a color because lightness and saturation are separate controls. To make a hover state, keep the hue and saturation and raise the lightness by 10 points; to mute a color for a background, keep the hue and lightness and lower the saturation. In HEX or RGB, the same change means guessing three numbers at once, and it is easy to shift the hue by accident.

Design systems are usually written in HSL for exactly this reason, even when they ship as HEX. A palette built as one hue with lightness steps — 90%, 70%, 50%, 30% — stays harmonious because the hue never moves. The converter is the bridge: take a HEX code from a brand guide, read its HSL, and build the scale from there.

One hue (217°), five lightness steps — tap a swatch to copy its HEX code

Same hue, same saturation (91%) — only the lightness moves, so the scale stays harmonious.

A note on rounding: converting back can shift two channels by 1

HSL values are rounded to whole numbers, so converting rounded HSL back to HEX can shift two channels by 1. The exact HSL of #3B82F6 is about 217.2 degrees, 91.2% saturation, and 59.8% lightness, and rounding those to 217, 91%, and 60% loses a fraction of a unit. Converting the rounded values back can give #3C83F6 instead of #3B82F6 — one step different in the red and green channels.

That shift is too small to see with the eye, and it is normal for every converter that shows whole numbers. It matters only if you need a bit-exact round trip, in which case you should keep the original HEX code rather than converting back from the rounded HSL. The tool states the rounding plainly so nobody is surprised by it.

Exact HSL

217.2°, 91.2%, 59.8%

#3B82F6

Rounded HSL

217°, 91%, 60%

#3C83F6

Red 59 → 60 and green 130 → 131 — rounding, not an error.

All color tools

21 tools, one topic — see About Hex Color Code Picker for who built this site.

Frequently asked questions

Paste the HEX code and copy the HSL values. The tool shows the hue in degrees from 0 to 360, the saturation as a percentage, and the lightness as a percentage, plus a copyable hsl(H, S%, L%) value.