Lightness
The L* component represents lightness. In the commonly used CIELAB convention, values are generally expressed from 0 for black toward 100 for a reference white.
Enter CIE Lab (L*a*b*) values or paste a lab() / lch() value and get the hex code instantly — plus RGB, HSL, OKLCH, sRGB gamut warnings and a live preview.
Input LAB
Accepts lab(), lch() and bare L a b or L C H triplets. Whitespace, commas and slashes are all handled.
Manual LAB sliders
Drag to explore LAB space. Values are clamped to L* 0–100 and a*/b* −128–127.
Quick presets
LAB neighbors
Colors shifted ±10 in a* and b* from your input.
Live preview
Text on white, muted text, and a button using your color as its background.
Channel values
Contrast checks (WCAG 2, 4.5:1)
Convert CIE LAB color values into HEX colors for web design, development, branding, digital graphics and modern color workflows. Enter Lightness, a* and b* values and get a practical HEX color representation for digital use.
A LAB to HEX Converter is a color conversion tool that transforms colors expressed in the CIE L*a*b* color model into a HEX representation commonly used in web development and digital design.
LAB describes color using three components: Lightness (L*), the green-to-red a* axis and the blue-to-yellow b* axis. HEX, by comparison, represents an RGB color using hexadecimal notation.
Because these systems describe color differently, LAB to HEX conversion requires mathematical color-space transformations rather than simply changing three numbers.
CIE L*a*b*, commonly shortened to LAB, is a color model designed to describe colors in a way that is more related to human visual perception than basic device-oriented RGB values.
The L* component represents lightness. In the commonly used CIELAB convention, values are generally expressed from 0 for black toward 100 for a reference white.
The a* axis represents a chromatic dimension extending broadly from green through neutral toward red.
The b* axis represents another chromatic dimension extending broadly from blue through neutral toward yellow.
LAB and HEX belong to different color systems. A reliable conversion therefore passes through intermediate color representations.
A typical digital workflow converts CIELAB to XYZ and then from XYZ into linear RGB and finally encoded sRGB values. The resulting red, green and blue channels can then be represented as a HEX code.
LAB and HEX are not competing formats. They solve different problems. LAB is useful for describing and comparing colors, while HEX is convenient for representing RGB colors in websites and digital interfaces.
LAB can be useful during color research, measurement and color comparison, but many everyday digital workflows require RGB-based values. HEX provides a compact representation that can be copied directly into many web-development workflows.
Convert a LAB color into a HEX value when you need an RGB-based color notation for a website or interface.
Translate colors from advanced design workflows into practical digital values for interface components.
Convert analyzed or documented brand colors into a format that can be easily shared with web developers.
Move between perceptual color analysis and RGB-based digital representations.
Use the resulting HEX value where a conventional RGB hexadecimal color notation is preferred.
Give developers a familiar HEX value alongside the original LAB color specification.
LAB and RGB use different mathematical models. Converting LAB to HEX requires transforming the color through a defined color-space pipeline. Simply treating L*, a* and b* as red, green and blue values would produce an incorrect color.
HEX is ultimately a representation of RGB channel values. Therefore, LAB to HEX conversion normally involves obtaining RGB values first and then encoding those values as hexadecimal components.
60
20
-30
108
145
201
Modern CSS supports multiple color functions. Traditional HEX
notation remains common because it is concise and widely recognized,
while CSS also provides modern functions such as lab()
and oklch().
If your design specification is written in LAB but your project uses HEX variables, converting the color can make the handoff easier.
:root {
--brand-color: #6C91C9;
}
.card {
color: var(--brand-color);
}
.modern {
color: lab(60% 20 -30);
}
Designers may encounter LAB values in color-management workflows, scientific references, imaging applications or color specifications. Converting those values to HEX can make them easier to communicate in web projects.
Identify the L*, a* and b* values of the color you want to use.
Transform the LAB color through the appropriate color-space conversion process.
Review the resulting RGB or HEX color and compare it with your intended visual reference.
Add the HEX color to CSS, design tokens, documentation or another digital workflow.
A LAB value does not exist independently of the assumptions used by the conversion process. Reference white, color-space definitions, RGB gamut and out-of-gamut handling can influence the resulting HEX value.
CIELAB calculations use a reference white. Different assumptions can produce different conversion results.
HEX commonly represents sRGB values, so the target RGB color space matters when converting LAB.
Some LAB colors cannot be represented exactly within the target RGB gamut and may require gamut mapping or clipping.
Rounding intermediate values can create small differences in the final RGB or HEX result.
LAB is part of a broader family of color representations used for describing and manipulating colors. LCH represents LAB using lightness, chroma and hue. OKLab and OKLCH are newer perceptual color models designed for modern digital color workflows.
Choosing the right color space depends on the task. LAB can be useful for color analysis, while OKLCH is increasingly useful for modern interface color systems and CSS workflows.
Confirm that your input values are CIE L*a*b* values rather than another color system using similar terminology.
For normal web HEX colors, sRGB is the usual target color space.
Not every LAB color can be represented exactly by sRGB, so some colors may need to be mapped into the available gamut.
LAB values and RGB channels describe colors using completely different coordinate systems.
If the converted HEX color will be used for text or interface elements, test its contrast against the intended background.
Save the original LAB specification when color accuracy and future conversion flexibility are important.
Modern web standards provide several color representations, including sRGB-based HEX colors and perceptual color functions such as LAB and OKLCH. These specifications are useful references when implementing color conversion and design systems.
Find quick answers to common questions about converting LAB colors into HEX values.
A LAB to HEX Converter transforms CIE L*a*b* color values into a HEX representation of an RGB color, commonly for digital and web design use.
Enter the L*, a* and b* values into a LAB to HEX conversion tool. The color is mathematically transformed into the target RGB color space and then represented as a HEX value.
L* represents lightness, a* represents a green-to-red chromatic axis and b* represents a blue-to-yellow chromatic axis in the CIELAB color model.
No. LAB and RGB are different color models. LAB uses lightness and two chromatic axes, while RGB uses red, green and blue channels.
HEX is a hexadecimal notation for RGB channel values. For example, an RGB color can be represented by its red, green and blue channel values in a six-digit HEX code.
Not always. Some LAB colors fall outside the target RGB gamut, so an exact representation may not be possible in sRGB and a gamut mapping or clipping method may be required.
Standard web HEX colors are generally interpreted as sRGB colors. Therefore, an LAB to HEX conversion intended for ordinary web use normally targets sRGB.
Yes. A valid HEX color can be used in CSS properties such as color, background-color and border-color.
LAB and HEX describe color using different coordinate systems. Conversion therefore requires transformations between compatible color spaces before the final RGB channels can be encoded as HEX.
LCH is a cylindrical representation derived from LAB. Instead of the a* and b* Cartesian axes, it uses chroma and hue along with lightness.
Yes. LAB was designed with perceptual properties in mind and is commonly used as a foundation for color-difference calculations and color analysis.
Yes. HEX can be converted to RGB and then through the appropriate color-space transformations into CIELAB. Use a HEX to LAB Converter for the reverse workflow.
Convert CIE LAB coordinates into HEX colors for websites, interfaces, branding, digital design and development workflows.