Color & Design guides

5 articles · Browse the Color & Design tools →

Every color on a screen is a set of numbers, and the same color can be written in several systems that suit different jobs. These guides explain how to read and convert between them, and when to choose which one.

A hex code such as #FF8000 is just three bytes written in base 16: FF = 255 red, 80 = 128 green, 00 = 0 blue. That gives 256 × 256 × 256 = 16,777,216 possible colors, which is why a six-digit code can name any sRGB color. RGB suits screens because they emit light. HSL and HSV rearrange the same values into hue (an angle from 0 to 360 degrees), saturation and lightness, which is easier for picking a darker or softer version of a color. CMYK describes ink on paper, and the range of colors a printer can reproduce is generally different from, and in places smaller than, what a screen can show, so a vivid screen blue can print duller. Perceptual models such as LAB and OKLCH space colors so that equal numeric steps look like equal steps to the eye, which makes gradients smoother and contrast easier to judge.

A practical tip: when checking whether text is readable, compare contrast ratios, not hue. WCAG 2 asks for at least 4.5 to 1 for normal body text and 3 to 1 for large text. Start with the color spaces overview below, then pick the guide that matches your task.