HEX to LAB Converter
Convert a HEX color code to CIELAB L*, a*, and b* values using the D65 white point. Type a hex code or move the RGB sliders and read the LAB result with a color preview.
Was this tool helpful?
Continue Your Colors Journey
What is HEX to LAB Converter?
The HEX to LAB Converter turns a hex color code into CIELAB values. Type a code such as #3B82F6 or move the RGB sliders, then read L*, a*, and b* with a color preview. The conversion uses sRGB and the D65 white point.
How does HEX to LAB Converter work?
A hex code is three sRGB channels written in base 16. The converter reads them as red, green, and blue, linearizes each channel with the sRGB curve, and multiplies by the D65 matrix to get XYZ. XYZ then converts to CIELAB relative to the D65 reference white.
L* runs from 0 for black to 100 for white. The a* axis runs from green to red and b* from blue to yellow. Across all sRGB colors, a* stays between about -86 and 98 and b* between about -108 and 94.
Key Features
- Accepts a hex code or RGB slider input
- Converts through XYZ with the D65 matrix and white point
- Reports L*, a*, and b* to two decimal places
- Live preview of the input color
- Four preset colors with matching hex codes
- Gives L* 100, a* 0, b* 0 for white
Common Use Cases
Measure the difference between two brand colors
Convert both hex codes to LAB, then compare the values or feed them into a Delta E formula.
Check how light a hex color is
Read L* to judge perceived lightness, which a hex code does not show.
Prepare values for a color-science paper
Report a screen color in CIELAB, the space most standards use.
Verify a conversion in your own code
Compare your hex-to-LAB function against a reference for a set of codes.
How to Use This Tool
Enter a hex code
Open the HEX input and type a code such as #3B82F6, or use the RGB sliders.
Check the preview
The swatch confirms the color the code describes.
Read L*, a*, and b*
The result lists the three LAB values to two decimal places.
Try a preset
Select blue, red, green, or purple to see how each Tailwind color lands in LAB.
Copy the lab() string
Copy the value into your notes, a report, or code.
Pro Tips
- 1
Hex #FFFFFF returns L* 100 with a* and b* at 0, and #000000 returns all zeros. Use them to check your own code.
- 2
Hex #FF0000 returns about L* 53.24, a* 80.09, and b* 67.20, a common reference for sRGB red.
- 3
These are D65 values. CSS lab() is defined against D50, so a browser shows different numbers.
- 4
Three-digit hex codes expand each digit, so #F00 is the same color as #FF0000.
- 5
Use the LAB to RGB Converter to return to screen channels.
Frequently Asked Questions
How do I convert a hex color to LAB?
Read the hex code as sRGB, convert it to XYZ with the D65 matrix, then to CIELAB. This tool does it as soon as you enter a code.
What LAB value is #3B82F6?
Hex #3B82F6, the Tailwind blue-500 color, converts to about L* 55.63, a* 17.54, and b* -64.42.
Is there a hex code for LAB colors?
Hex codes describe sRGB only. A LAB color outside sRGB has no hex code, and a LAB inside it needs a converter to produce one.
Why does my LAB differ from what Photoshop shows?
Photoshop uses a D50 white point for its Lab values, while this tool uses D65. The same color gives different numbers under each.
Does the hex code need a hash sign?
No. The hash is optional, so #3B82F6 and 3B82F6 are both read. Three-digit codes also work, and F00 expands to FF0000.
Related Tools
Related Collections
Essential Color Converter Tools for Developers
Convert colors between HEX, RGB, HSL, CMYK, LAB, and XYZ. Includes a CIELAB calculator with six-decimal precision for design and print work.
Advanced Color Science Tools
CIELAB, XYZ, and CMYK color converters with a Delta E calculator using the CIEDE2000 formula and a color temperature calculator for D65 reference.