HEX, RGB, HSL and OKLCH explained
HEX and RGB describe the same thing: how much red, green and blue light make up a color on screen, each from 0 to 255. A HEX code simply writes those three numbers in base 16, so #0A5CFF is red 10, green 92 and blue 255. RGB is easier to read; HEX is shorter and common in design tools.
HSL describes a color by hue (an angle on the color wheel), saturation and lightness, which makes it easier to adjust by hand. Its weakness is that equal lightness values do not look equally light: a yellow and a blue at 50% lightness appear very different. OKLCH fixes that. It is a perceptual model, so changing lightness or chroma gives predictable, even results across hues, which is why it is increasingly used for design tokens and palettes. All current major browsers support oklch() in CSS.






