LAB to HEX Converter — Free Online Tool

Convert LAB color values to HEX codes instantly — enter L, a, and b to get an accurate HEX color and preview, no signup required.

HEX
#FF0000
RGB
rgb(255, 0, 0)
This LAB value falls outside the visible sRGB range. Showing the closest displayable HEX color.

How it works

LAB to HEX conversion works in two steps: LAB is first converted to CIE XYZ using the D65 reference white point, then XYZ is transformed into sRGB through a standard matrix and gamma-corrected to produce the final HEX code. This is a deterministic color-space calculation — the same LAB input always produces the same HEX output, unlike proprietary matching systems such as Pantone or RAL.

Some LAB values fall outside the range that sRGB screens can display. When that happens, this tool clamps the result to the nearest displayable color and flags it, so the HEX code you get is always the closest accurate on-screen match.

When to use this

  • Design handoff: convert LAB values from Photoshop, Illustrator, or a brand color spec into a HEX code for CSS and web use
  • Print-to-web color matching: LAB is the standard color space for print (it’s device-independent), so this bridges a print-defined color to its web equivalent
  • Cross-checking color accuracy: verify that a LAB-defined brand color renders correctly in a browser before it goes into production CSS

FAQ

How do I convert a LAB color to HEX?
Enter the L (lightness), a (green-red), and b (blue-yellow) values into the tool, and it instantly calculates the matching HEX code using standard LAB-to-XYZ-to-sRGB conversion.

Is LAB to HEX conversion always exact?
Yes, for LAB values within the sRGB gamut — it’s a direct mathematical conversion, not an approximation. Values outside the visible sRGB range are shown as the closest displayable HEX color, with a warning noted on-screen.

What’s the difference between LAB and HEX?
LAB is a device-independent color space used in design and print software to represent the full range of visible color, while HEX is a web-specific format representing only the colors displayable in sRGB — LAB has a wider range, so not every LAB value maps to an exact HEX equivalent.

Scroll to Top