0

Encoded

Lab Color

About Lab Color

Lab color is a color space that represents colors with lightness, a green-to-red axis, and a blue-to-yellow axis. Unlike RGB, which directly specifies the red, green, and blue components of a display, Lab separates brightness and color in a way that is closer to human vision.

ComponentMeaningExample value
L: LightnessRepresents the brightness of the color. 0% is black and 100% is white.60%
aRepresents the direction from green to red. Negative values are greener, and positive values are redder.40
bRepresents the direction from blue to yellow. Negative values are bluer, and positive values are yellower.30

For example, major colors such as red can be represented as follows.

ColorLab notationRGB notation
Redlab(54.29% 80.8049 69.891)rgb(255 0 0)
Greenlab(46.28% -47.5524 48.5863)rgb(0 128 0)
Limelab(87.82% -79.2711 80.9946)rgb(0 255 0)
Bluelab(29.57% 68.2874 -112.0297)rgb(0 0 255)
Whitelab(100% 0 0)rgb(255 255 255)
Blacklab(0% 0 0)rgb(0 0 0)

To include transparency, add an alpha value. For example, semi-transparent red can be represented as lab(54.29% 80.8049 69.891 / 0.5).

Handling of lightness, a, and b

Lightness is handled in the range from 0% to 100%. Values below 0% are treated as 0%, and values above 100% are clamped to 100%.

a and b are specified as positive or negative numbers. Their values are not clipped to a fixed range, and are handled as the specified Lab components.

Difference between Lab and LCH

Lab represents colors with the rectangular coordinates a and b. LCH uses the same perception-based idea as Lab, but represents the color tone with chroma and hue.