RGB to LAB Color Converter
Convert sRGB or HEX to CIELAB and back through CIE XYZ at the D65 white point, with every intermediate step shown and out-of-gamut warnings.
Result
Every step of the conversion
What is the RGB to LAB Color Converter?
CIELAB is the colour space that colour science actually runs on. Its L* axis is perceptual lightness from 0 to 100, a* runs green to red and b* runs blue to yellow, and distances inside it approximate how different two colours look.
- Two-way conversion between sRGB/HEX and CIELAB
- Shows CIE XYZ as an explicit intermediate step
- D65, 2° standard observer throughout
- Flags Lab values that no sRGB screen can display
- Also reports CIELCH and CSS lab() and oklch() strings
- Runs entirely client-side, no uploads
How to use the RGB to LAB Color Converter
- 1
Choose a direction: sRGB to CIELAB, or CIELAB back to sRGB.
- 2
Enter a hex colour, or type L*, a* and b* values directly in the number fields.
- 3
Read the CIE XYZ intermediate values and the final L*, a*, b* result.
- 4
Copy the CSS lab() string or the hex value from the buttons at the bottom.
About the RGB to LAB Color Converter
CIELAB is the colour space that colour science actually runs on. Its L* axis is perceptual lightness from 0 to 100, a* runs green to red and b* runs blue to yellow, and distances inside it approximate how different two colours look. That makes it the space behind Delta E, print colour matching and most colour-difference work.
This converter shows the whole journey rather than just the answer. Your sRGB channels are linearised, multiplied by the sRGB matrix into CIE XYZ, and then run through the f(t) function — a cube root above the 216/24389 threshold and a linear segment below it — before L*, a* and b* are read off. The XYZ intermediate is printed so you can check the working.
Every calculation happens in your browser. Nothing is uploaded, and the D65 two-degree standard observer is used throughout so the numbers line up with the reference tables you are probably comparing against.
Frequently asked questions
What do the L, a and b values in LAB mean?
L* is lightness from 0 (black) to 100 (diffuse white). a* is the green-to-red axis, negative for green and positive for red. b* is the blue-to-yellow axis, negative for blue and positive for yellow. Unlike RGB, none of the three corresponds to a physical light source.
Why does my LAB value convert back to a different RGB?
Because CIELAB can describe colours that no sRGB monitor can produce. If your a* and b* are far from zero at a high or low L*, the value sits outside the sRGB gamut and gets clipped to the nearest displayable colour. The tool warns you when that happens.
What white point does this converter use?
D65 with the 2° standard observer, which is the white point sRGB itself is defined against and the one CSS lab() uses. If you are comparing against a print workflow that uses D50, expect small differences in a* and b*.
Is CIELAB better than RGB for comparing colors?
For measuring how different two colours look, yes, and by a wide margin. Equal steps in RGB do not correspond to equal perceived steps, whereas CIELAB was designed so that Euclidean distance roughly tracks perception. That is exactly why Delta E is defined in Lab.
Why is the conversion not a simple formula?
sRGB stores values with a gamma curve so that dark tones get more precision. That curve has to be undone before any linear-algebra step, which is the linearisation stage. Skipping it is the single most common source of wrong Lab values.
Related tools
Delta E Color Difference Calculator
Measure how different two colours look with CIE76, CIE94 and CIEDE2000, and read the result against the just-noticeable-difference scale used in print QC.
CSS Color Format Converter
Turn one colour into every modern CSS syntax at once: hex, rgb, hsl, hwb, lab, lch, oklab, oklch and display-p3, each with its own copy button.
OKLCH Color Converter
Convert HEX and RGB to OKLCH or OKLab and back, with a live swatch, gamut warnings and ready-to-paste oklch() CSS for Tailwind v4.
RGB to HSV/HSB Converter
Convert HEX or RGB to HSV (the HSB model in Photoshop and Figma) and back, with the HSL equivalent shown beside it so you can see why they disagree.
HEX to RGB Converter
Convert HEX color codes to RGB and RGBA instantly. Supports 3, 6 and 8-digit HEX with a live color swatch, batch list conversion and one-click copy.