Which color formats should I use in CSS?
HEX, RGB, HSL and OKLCH are all valid CSS color formats. HEX is compact, RGB maps directly to screen channels, HSL makes it easier to adjust one property such as lightness without changing the hue, and OKLCH uses perceptual lightness so equal values look equally bright.