Convert RGB channels to CIELAB coordinates for perceptual work — color difference, gamut math, print pipelines. Uses the CSS Color 4 reference path through linear light and XYZ with D50 adaptation, so results match browser lab() values, not the loose formulas many converters use.
Settings
Generated locally in your browser — your settings and results never leave this page.
Why the pipeline has four stages
Each stage exists for a measurable reason. Gamma decoding: sRGB stores channels non-linearly to spend bits where eyes are sensitive — XYZ needs linear light. The matrix: sRGB’s primaries defined against the CIE observer. Bradford adaptation: display white (D65) versus Lab’s reference white (D50) — graphics-arts convention. The cube root: approximating human lightness response. Skip any stage and the output is confidently wrong.
Worked example: rgb(219, 112, 147)
Pale violet red:
linear ≈ (0.7155, 0.1636, 0.2977) XYZ(D65) ≈ (0.4027, 0.2876, 0.3103) rgb(219, 112, 147) = lab(60.91% 45.4 1.21)
Positive a* (45.4) says pink-red; mildly negative b* (1.21) says a whisper of blue — the “violet” in the name. L* near 61 puts it in the readable-on-white borderlands, which the Contrast Checker can adjudicate.
The one number worth extracting daily
L*. It is the honest lightness that HSL never gives you: sort palettes by it, compare candidate text colors by it, define tonal systems on it. If a team adopts a single perceptual habit, “check the L*” is the highest-value one.
Related instruments
ΔE work continues in the Color Difference Calculator; polar editing in the LCH converter; the modern-CSS sibling in RGB to OKLCH, whose OKLab improves on Lab’s known hue bends.
Reference values, computed live
Reference values anchor intuition better than definitions. Seven named colors and their exact CIELAB coordinates under the CSS Color 4 pipeline this converter implements:
| Color | RGB | LAB |
|---|---|---|
| indigo | rgb(75, 0, 130) | lab(19.7% 47 -54.3) |
| gold | rgb(255, 215, 0) | lab(87.5% 2.9 86.6) |
| teal | rgb(0, 128, 128) | lab(48% -30.4 -9) |
| slateblue | rgb(106, 90, 205) | lab(44.6% 29.7 -58.7) |
| sienna | rgb(160, 82, 45) | lab(44.3% 30.9 36.3) |
| yellowgreen | rgb(154, 205, 50) | lab(76.8% -33.1 65.6) |
| dodgerblue | rgb(30, 144, 255) | lab(58.4% 0.9 -64.8) |
Read the columns vertically: L* tracks how the colors would sort in a grayscale photocopy, a* flips sign precisely where reds hand over to greens, and b* where yellows hand over to blues. Once those three vertical stories are familiar, unfamiliar Lab values start reading like descriptions instead of coordinates.
The instrument-agreement test
A useful trust exercise for any Lab pipeline: take a physical color reference (a printed swatchbook page, a calibration target), measure it with whatever instrument or app you have, and convert its published sRGB value here. Agreement within a few ΔE validates the whole chain — screen profile, converter, instrument — while disagreement localizes the problem to whichever link diverges. Teams that run this five-minute ritual before color-critical projects catch profile rot early; the converter’s spec-exact pipeline is what makes it a fixed point in the comparison.
How to use the RGB to LAB Converter
- Enter the RGB color.
- The result updates live as you type – no convert button needed.
- Copy the Lab triplet for ΔE work or CSS lab() use.
- Share the exact result: the page URL updates with your input, so the link reproduces it.
Frequently asked questions
What Lab value does rgb(30, 144, 255) have?
lab(58.36% 0.89 -64.78) under the CSS Color 4 pipeline. The negative a* says it leans faintly green-of-neutral; the −64.78 b* is the strong blue component. The tool computes the same chain for any input.
Why must sRGB be linearized before the matrix?
Because sRGB channels are gamma-encoded for storage efficiency, but XYZ is defined in linear light. Skipping the linearization – a common shortcut in quick scripts – produces Lab values that are wrong by several ΔE, worst in the mid-tones.
Is the L* in Lab the same as HSL lightness?
No – HSL's L is channel arithmetic, Lab's L* models human vision with a cube-root response. Yellow and blue at HSL L=50% differ wildly in L*: that disagreement is precisely why Lab exists.
What is L* useful for in practice?
Ordering colors by honest lightness (palette ramps), estimating readable pairings before a contrast check, and defining tonal systems – Material-style tone numbers are essentially L* targets.
How do I measure the difference between two RGB colors in Lab?
Convert both here, or skip a step: the Color Difference Calculator takes the two RGB colors directly and reports ΔE2000, ΔE76 and the per-axis deltas.
Does alpha survive into Lab?
Lab describes the color, not its opacity; alpha rides alongside unchanged. CSS lab() syntax accepts an alpha after a slash, and the all-formats output preserves yours.
Which is better for palette math, Lab or OKLab?
OKLab – newer math, better hue linearity, and it is what CSS gradients interpolate by default. Lab remains right for interchange with measurement instruments and print. This site converts to both; compare them side by side in the Complete Color Converter.