Skip to main content

How to Read Color Codes — HEX, RGB, HSL, and CMYK Explained

January 26, 2026 · 7 min read

A clear, practical guide to reading and converting HEX, RGB, HSL, HSV, and CMYK color codes.

Why color codes exist

Designers, developers, and printers all need a precise way to say "this exact shade of blue." Each format optimizes for a different use case.

HEX codes (#RRGGBB)

Six hex digits, two each for red, green, blue, 00 to FF (0 to 255 in decimal). #FF0000 is pure red, #00FF00 is pure green, #FFFFFF is white, #000000 is black.

RGB on a 0–255 scale

Same three channels, just written as decimal numbers: rgb(255, 0, 0). Easier to read at a glance, more verbose to type.

HSL — Hue, Saturation, Lightness

Hue is the color (0–360°). Saturation is how vivid (0–100%). Lightness is how bright (0% black, 100% white). Designers love it because adjusting one slider does what you'd expect.

CMYK for print

Cyan, magenta, yellow, black (key). Subtractive — you start with white paper and add ink. Always check colors look right in CMYK before sending to print, because some screen blues just don't exist in ink.

HSV / HSB

Same idea as HSL but uses Value/Brightness instead of Lightness. Most design apps (Photoshop, Figma) expose HSB pickers.

Converting between them

The math is straightforward but tedious. Our free color converter handles it instantly with a live swatch preview.

Frequently asked questions

What is #FFFFFF?

Pure white. Same as rgb(255, 255, 255).

What is RGB(0,0,0)?

Pure black. Same as #000000.

Try the tools: