lch()
The lch() functional notation expresses a given color in the LCH color space. It has the same L axis as lab(), but uses polar coordinates C (Chroma) and H (Hue).
Syntax
lch(29.2345% 44.2 27); lch(52.2345% 72.2 56.2); lch(52.2345% 72.2 56.2 / .5);
Values
- Functional notation:
lch(L C H [/ A]) -
Lspecifies the CIE Lightness, and is a<percentage>between0%representing black and100%representing white.The second argument
Cis the chroma (roughly representing the "amount of color"). Its minimum useful value is 0, while its maximum is theoretically unbounded (but in practice does not exceed 230).The third argument
His the hue angle.0degpoints along the positive "a" axis (toward purplish red),90degpoints along the positive "b" axis (toward mustard yellow),180degpoints along the negative "a" axis (toward greenish cyan), and270degpoints along the negative "b" axis (toward sky blue).A(alpha) can be a<number>between0and1, or a<percentage>, where the number1corresponds to100%(full opacity).
Specifications
| Specification |
|---|
| CSS Color Module Level 4 (CSS Color 4) # lab-colors |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
lch() |
No |
No |
No |
No |
No |
15 |
No |
No |
No |
No |
15 |
No |
See also
- LCH colors in CSS: what, why, and how?
-
Safari Technology Preview 122 release notes: includes
lch()andlab()colors.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/lch()