light-dark()
light-dark()
The light-dark() function takes two color values—one for “light” mode and one for “dark” mode, and automatically switches between them depending on […]
html { color: light-dark(#000, #fff); }
Continue Reading
lab()
lab()
The lab() color function represents colors in the CIELAB color space. It displays them according to their lightness, red/green axis position, blue/yellow axis position, and an optional alpha transparency value.
.element { color: lab(50% 50% 50% / 0.5); }
Continue Reading
lch()
lch()
The lch()
color function specifies colors in the CIELAB color space. Unlike the lab()
function — which uses Cartesian coordinates — the lch()
function uses polar coordinates to set color in terms of its hue and chroma, which is generally more intuitive.
.element { color: lch(10% 0.215 15deg); }
Continue Reading