We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Two-way conversion between RGB and CIELab color spaces, providing precise color mapping for designers and developers.
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
Use the converter to move between an 8-bit sRGB color and CIE L*a*b* (CIELAB) coordinates. Enter a HEX color, choose a preset, or adjust the RGB controls; the page updates the color preview and corresponding values. Adjusting the Lab controls works in the reverse direction and returns an sRGB color. The RGB channels use integer values from 0 to 255. The Lab controls allow L* from 0 to 100 and a* and b* from −128 to 127, with 0.1 steps.
L* describes lightness; a* runs from greenish negative values toward reddish positive values; b* runs from bluish negative values toward yellowish positive values. These are coordinates, not separate red, green, and blue channels.
CIELAB coordinates are calculated relative to a specified reference white. This converter follows an sRGB to XYZ path using D65 and the D65 reference white constants in its calculation. A “Lab” value from another program may use a different RGB profile or reference white, so the same displayed color can produce different coordinates. The CIE definition is based on XYZ tristimulus values and a specified white stimulus.
For each normalized XYZ component, the CIELAB calculation applies a piecewise function f. The coordinates are L* = 116f(Y/Yn) − 16, a* = 500[f(X/Xn) − f(Y/Yn)], and b* = 200[f(Y/Yn) − f(Z/Zn)]. Here Xn, Yn, and Zn identify the reference white.
Start with the HEX value if you have a color from a website or design file. A valid HEX value updates RGB, Lab, and the preview together. If the text is not yet a valid color, the current valid result remains until the input parses.
Use the RGB controls when you need exact integer channel values. Use the Lab controls when you want to explore lightness or the green–red and blue–yellow axes. The displayed RGB is rounded to whole channel values, while Lab results from RGB are shown to two decimal places.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Enter a valid HEX color such as #3B82F6, select a preset, or open the color picker. Check the preview to confirm you have the intended source.
Read the linked RGB and Lab values, or move an RGB slider in whole-number increments. For a Lab target, adjust L*, a*, or b* in 0.1 increments and observe the resulting sRGB color.
Copy the HEX value, RGB expression, an individual Lab coordinate, or the complete result. Keep the reference-white and input-space assumptions with the copied Lab numbers when sharing them.
For example, a blue-looking color often has a negative b* coordinate, while a nearly neutral gray tends to have a* and b* nearer zero. Treat this as an interpretation aid rather than a color measurement.
Use cases
See how the tool fits into real work and everyday tasks.
Convert an existing HEX or RGB swatch into Lab coordinates so designers and developers can discuss its lightness and color direction with the conversion assumptions stated.
Convert colors one at a time and compare their L*, a*, and b* coordinates. This is useful for visual review, but it does not compute a color-difference score between two samples.
Move Lab sliders and observe the returned RGB values to see how an intended coordinate maps into the available sRGB channels. Use this as a quick check, not as a full color-management proof.
Q&A
Find concise answers to common questions and confusing cases.
lab() or another converter?Check the source RGB color space, reference white, white-point adaptation, rounding, and out-of-gamut mapping. This page’s Lab calculation uses D65; CSS Color 4 defines CSS lab() with D50 conditions, so the coordinates should not be copied across without the required color conversion.
rgb(...) or Lab(...) text?No. The text entry is for HEX colors. Adjust RGB and Lab values with their controls instead.
No. It converts one color at a time. It does not accept a second sample or report ΔE76, CIE94, or CIEDE2000.
Notes
Review scope, result limitations, and important precautions before use.
Related
Discover related tools, collections, and available API capabilities.