HEX to HSL converter
Enter a HEX value such as #E76F51 to convert it to HSL. Every other format is shown too, and the result updates as you type.
Detected HEX.
Examples: #1e90ff, rgb(30 144 255 / 50%), hsl(210 100% 56%), oklch(0.65 0.18 255), cmyk(88% 44% 0% 0%), tomato
- Name
- Vermilion(descriptive)
- Alpha
- 100%
- Relative luminance
- 0.2895
- Perceived lightness (OKLCH L)
- 67.8%
- Contrast on white
- 3.09:1
- Contrast on black
- 6.79:1
Converted values
- HEX
#e76f51 - RGB
rgb(231 111 81) - HSL
hsl(12 75.8% 61.2%) - HSV / HSB
hsv(12 64.9% 90.6%) - HWB
hwb(12 31.8% 9.4%) - OKLCH
oklch(67.83% 0.1559 35.18) - OKLAB
oklab(67.83% 0.1274 0.0898) - CIELAB
lab(61.37% 45.95 39.53) - CMYK
cmyk(0% 52% 65% 9%)
CMYK is a naive, device-independent approximation. Real print colours depend on the ink, paper and ICC profile your printer uses, so ask your printer for a proofed conversion. HSV/HSB is not a CSS format and is shown for design apps. CIELAB uses the D50 white point, as in CSS lab().
How to convert HEX to HSL
- Convert the HEX code to RGB and divide each channel by 255.
- Lightness is the average of the largest and smallest channel.
- Saturation is the channel range divided by 1 − |2L − 1|.
- Hue depends on which channel is largest and is expressed in degrees around the colour wheel.
About HEX
A HEX code writes the red, green and blue channels of an sRGB colour as two hexadecimal digits each (00–FF), so #FF5733 means red 255, green 87, blue 51. An optional fourth pair adds transparency, and three-digit shorthand such as #F53 doubles each digit.
About HSL
HSL describes a colour as a hue angle (0–360°), saturation and lightness. It is easy to adjust by hand, but its lightness is not perceptual: a yellow and a blue at 50% lightness look very different in brightness.