Irodori彩り

HEX to HSL

HEX · RGB · HSL · OKLCH · Lab · CMYK

HEX to HSL

Every color format describes the same thing in a different language: HEX for stylesheets, RGB for screens and code, HSL for building palettes, CMYK for print. Pick the conversion you need and get the exact value, a live preview and the formula behind it.

This color in every format

The same color written as HEX, RGB, HSL and CMYK. Copy any value.

HEX to HSL conversion

Every conversion first normalises HEX into an sRGB triplet — red, green and blue on a 0–255 scale — and then encodes that triplet as HSL. Both notations describe the same pixel, so the visible color does not change.

1

Read the input

Split the HEX value into its channels (hex digit pairs, numbers or percentages).

2

Normalise to sRGB

Scale each channel onto 0–255 so rounding differences do not accumulate.

3

Encode HSL

Write the result in HSL notation and copy it into your stylesheet or design tool.

Formula

#FF5733
→ sRGB  rgb(255,87,51)
→ HSL  hsl(11, 100%, 60%)

Worked example

#FF5733 = #FF5733 = hsl(11, 100%, 60%)

Values are rounded to whole channels; convert back with the same tool to avoid drift.

HEX to HSL reference table

Common values converted with the same formula.

Input (HEX)Result (HSL)
#FF5733hsl(11, 100%, 60%)
#4F46E5hsl(243, 75%, 59%)
#2ECC71hsl(145, 63%, 49%)
#3498DBhsl(204, 70%, 53%)
#E74C3Chsl(6, 78%, 57%)
#19AE99hsl(172, 75%, 39%)
#9B59B6hsl(283, 39%, 53%)
#F39C12hsl(37, 90%, 51%)
#34495Ehsl(210, 29%, 29%)
#E91F63hsl(340, 82%, 52%)
#000000hsl(0, 0%, 0%)
#FFFFFFhsl(0, 0%, 100%)

All converters

Frequently asked questions

Does converting HEX to HSL change the color?
No. Both formats describe the same sRGB color; only the notation changes.
Why do my HSL values differ from another converter?
Rounding. Other tools may round at a different step or use a different white point; ours follows CSS Color 4 and D65.
Can I paste the HSL value into CSS?
Yes. HSL is native CSS or a widely supported notation, so it works in stylesheets, canvas and design tools.
Which format should I use for print?
Use CMYK for print and RGB/HEX for screens. CMYK is an approximation, so convert the final artwork with your printer profile.