The RGB Color Model: How Screens Make 16.7 Million Colors

Guide · Updated 2026-07-28 · Yexla Team

Every pixel on your screen is three microscopic lights — red, green and blue. Vary each from 0 to 255 and mix: that's the RGB model. It is additive: more light means brighter color, and all three at maximum make white. This mirrors human vision, which samples the world through three cone types roughly tuned to long (red), medium (green) and short (blue) wavelengths.

Additive vs subtractive

Screens add light (RGB); print absorbs it (CMYK). That single difference explains most digital-vs-print color surprises — see digital vs print colors.

MixResult
R + GYellow
G + BCyan
R + BMagenta
R + G + BWhite
noneBlack

Bit depth and gamut

Standard "8-bit per channel" gives 256 levels each — 16.7 million combinations. HDR pipelines use 10 or 12 bits for smoother gradients. Separately, the gamut question is which actual colors the three primaries can reach: sRGB is the web default; Display P3 is ~25% larger; Adobe RGB extends the greens for print work. The same rgb(255,0,0) is a different physical red in each space.

Gamma: why RGB values aren't linear

Stored RGB values are gamma-encoded to match human brightness perception — value 128 is not half the light of 255. Correct blending, averaging and 3D lighting require converting to linear RGB first, doing the math, then converting back.

Working with RGB

Convert RGB to any format with our tools: HEX, HSL, CMYK, LAB, OKLCH.

Frequently asked questions

Why 255?

8 bits per channel gives 2⁸ = 256 levels, numbered 0–255. It balances file size against banding-free gradients for most content.

What is the difference between RGB and sRGB?

RGB is the general model; sRGB is a specific standard (primaries + gamma curve) that defines exactly which red, green and blue are used. The web assumes sRGB unless declared otherwise.

Why do my RGB colors look different printed?

Print uses subtractive CMYK inks with a smaller gamut — vivid screen colors (especially saturated blues and greens) are physically unreachable with ink.