lch() CSS Function
The lch() function defines a color in the CIE LCH color space by lightness, chroma and hue.
Description
The lch() CSS function defines a color in the CIE LCH color space using three components: lightness (L), chroma (C) and hue (H). LCH is the cylindrical form of the lab() color space. It is designed around how people perceive color, so changing one component produces a predictable visual change: raising lightness makes a color look lighter by a consistent amount whatever its hue, which is not true of hsl().
Lightness runs from 0 (black) to 100 (white), or 0% to 100%. Chroma is the amount of color, from 0 (gray) upwards; in practice values rarely go above about 150, and 100% equals 150. Hue is an angle around the color wheel, written as a number of degrees or with an angle unit. Because LCH can describe colors outside sRGB, browsers display the closest color the screen supports. An optional alpha value can be added after a slash.
.primary {
background-color: lch(55% 70 265); /* a strong blue */
}
/* Same lightness and chroma, different hues: a balanced palette */
.tag-red { background-color: lch(60% 60 30); }
.tag-green { background-color: lch(60% 60 140); }
.tag-purple { background-color: lch(60% 60 300); }
/* Relative color: a lighter version of a variable */
.primary:hover {
background-color: lch(from var(--brand) calc(l + 15) c h);
}
Because the lightness is perceptually uniform, lch() is a good choice for building color scales and checking contrast. For more even hue behaviour, especially in blues, consider the related oklch() function.
Interactive Demo
Syntax
lch() = lch( [ from <color> ]? [ <percentage> | <number> | none ]
[ <percentage> | <number> | none ]
[ <hue> | none ]
[ / [ <alpha-value> | none ] ]? )
Values
- L (lightness)A <number> from 0 to 100 or a <percentage> from 0% to 100%. 0 is black and 100 is white.
- C (chroma)A <number> or <percentage> for the amount of color. 0 is gray; 100% equals 150. Values are theoretically unbounded but rarely exceed 230.
- H (hue)A <hue> (number of degrees or <angle>) giving the position on the color wheel.
- alphaOptional. An <alpha-value> after a slash (/) from 0 to 1, or a percentage.
Example
Browser Support
The following information will show you the current browser support for the CSS lch() function. Hover over a browser icon to see the version that first introduced support for this CSS function.
Desktop





Tablets & Mobile





