oklch() is a CSS color function based on the Oklab perceptual color space, modeling lightness, chroma, and hue to match human vision. Unlike RGB, adjusting brightness in oklch requires changing only one value (L), making color manipulation more predictable and accessible. It supports a wider color gamut including Display-P3 colors, though it has limitations with gradients due to its polar hue dimension. It's backwards compatible in modern browsers for sRGB displays and is positioned as a useful tool for designers and UI engineers rather than an immediate replacement for RGB.
6 Comments
Sort: