HEX to CIELAB converter
Enter a HEX value such as #FF006E to convert it to CIELAB. 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
- Vivid red(descriptive)
- Alpha
- 100%
- Relative luminance
- 0.2239
- Perceived lightness (OKLCH L)
- 64.1%
- Contrast on white
- 3.83:1
- Contrast on black
- 5.48:1
Converted values
- HEX
#ff006e - RGB
rgb(255 0 110) - HSL
hsl(334.1 100% 50%) - HSV / HSB
hsv(334.1 100% 100%) - HWB
hwb(334.1 0% 0%) - OKLCH
oklch(64.06% 0.2565 8.07) - OKLAB
oklab(64.06% 0.254 0.036) - CIELAB
lab(55.27% 83.01 16.19) - CMYK
cmyk(0% 100% 57% 0%)
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 CIELAB
- Convert HEX to linear sRGB, then to CIE XYZ using the D65 white point.
- Adapt XYZ from D65 to D50 with the Bradford transform (as CSS does).
- Apply the CIELAB functions: L* = 116·f(Y/Yn) − 16, a* = 500·(f(X/Xn) − f(Y/Yn)), b* = 200·(f(Y/Yn) − f(Z/Zn)).
- The result is lab(L a b) with L from 0 to 100.
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 CIELAB
CIELAB (L*a*b*) is the classic device-independent colour space from 1976, used in print, paint matching and colour-difference formulas. CSS lab() uses the D50 white point, as do these conversions.