30

RGB, sRGB, Adobe RGB, ProPhoto, Display P3, and Rec.2020

Every digital file that says it stores "RGB" is making an unstated promise about exactly which red, which green, and which blue. Different choices produce different colors, different gamuts, different bit-depth requirements, and different conversion math. This article unpacks the seven working spaces that dominate digital imaging and explains when to choose each.

Digital · 12 7 Live Demos ~55 min read sRGB → Rec.2020
7
Major RGB spaces
D65 / D50
Two main white points
8 → 12 bit
Depth range in use
2.4 / linear
Common gammas
00

Advanced RGB working-space workbench

An RGB triplet is meaningful only inside a color space, transfer function, white point, and encoding depth. This lab lets you push one color through those layers at once: decode to linear, convert through XYZ, optionally adapt white, quantize the result, and inspect clipping or banding risk before the image ever reaches a screen.

Interactive 00 - Advanced RGB conversion workbench

Compare gamut, transfer, bit depth, white adaptation, and clipping

Choose a source and destination working space, then adjust the encoded RGB triplet. The canvas shows the conversion path, chromaticity triangles, tone curve, quantized ramp, and source/destination swatches.

Source encoded #ff5050 in sRGB
Linear source 1.000, 0.080, 0.080
Destination encoded #f3634f in Display P3
Intermediate XYZ 47.6, 25.5, 9.1
Gamut verdict Inside destination gamut
Recommended workflow Use 8-bit sRGB for delivery.
Gamut fit0%
Clipping risk0%
Banding risk0%
White-point shift0%

Tip: choose ProPhoto as source, sRGB as destination, then raise saturation. The clipped destination channels show why wide-gamut editing and narrow-gamut delivery are different problems.

01

What "RGB" really means

Three things are routinely conflated under the label "RGB." All of them matter.

RGB color model
The general scheme of describing color as three additive primaries: red, green, blue. Says nothing about which red, green, blue.
RGB color space
A specific instance of the model. Defines exact primary chromaticities (x, y), a white point, and a transfer function. sRGB, Adobe RGB, etc. are all color spaces.
RGB encoding
The numeric representation - 8-bit integers, 10-bit integers, half-float, linear vs gamma-encoded. The bits stored in the file.

The triple (255, 0, 0) is meaningless without all three layers specified. It could mean "the most saturated red sRGB can produce" (one chromaticity), or "the most saturated red Display P3 can produce" (a substantially redder chromaticity), or even an out-of-range value in a 16-bit half-float linear image. A well-managed file tags its color space; an unmanaged file is silently assumed to be sRGB.

Three numbers do not define a color. A color space tag is required. Modern image formats - PNG, JPEG XL, AVIF, HEIF, modern TIFF - carry ICC profiles or named-space metadata. CSS Color 4 makes the same explicit: color(display-p3 1 0 0) means something different from color(srgb 1 0 0).
02

The seven canonical spaces

Almost every digital image you touch lives in one of these spaces. They are listed roughly by gamut size, smallest first.

sRGB (IEC 61966-2-1, 1996)

D65 · ~2.2 gamma · 8-bit typical

The default for the web, untagged JPEGs, most consumer monitors, and almost everything that says "RGB" without further qualification.

Use: web, social media, non-color-critical print prep.

Rec.709 (ITU-R BT.709, 1990)

D65 · gamma 2.4 · 8 or 10-bit

HDTV broadcast and Blu-ray. Same primaries as sRGB; slightly different transfer function. Almost identical gamut to sRGB.

Use: 1080p video, broadcast TV, classic streaming.

Adobe RGB (1998)

D65 · gamma 2.2 · 8 or 16-bit

Wider green than sRGB; same red and blue primaries. Designed for photographers who needed CMYK-printable green-cyan that sRGB couldn't represent.

Use: photo editing destined for print or wide-gamut display.

Display P3 (Apple, 2015)

D65 · sRGB transfer · 10-bit typical

DCI-P3 primaries with the D65 white point and sRGB transfer function. Used by Apple devices and most modern wide-gamut displays.

Use: web wide-gamut delivery, modern phone/laptop displays.

DCI-P3 (SMPTE 431-2, 2007)

DCI white · gamma 2.6 · 12-bit cinema

Same primaries as Display P3 but with a slightly green-shifted "DCI white" and a different gamma. The digital cinema reference.

Use: theatrical cinema mastering and projection.

Rec.2020 (ITU-R BT.2020, 2012)

D65 · BT.1886 / PQ / HLG · 10 or 12-bit

UHD/HDR primaries that sit on the spectral locus - the widest broadcast space in production. Few displays cover it fully; mastering happens in P3-D65 within the Rec.2020 container.

Use: 4K HDR streaming, Blu-ray UHD, broadcast HDR.

ProPhoto RGB (ROMM RGB)

D50 · gamma 1.8 · 16-bit required

Imaginary primaries far beyond visible. Covers nearly all reflective colors humans can see. Designed for high-end photo archival - so wide that 8-bit encoding visibly bands.

Use: master files, archival, raw conversion intermediate.

ACEScg / ACEScct (AMPAS)

D60 · linear or log · 16-bit half-float

Cinema compositing and grading spaces. AP1 primaries cover most of the visible gamut. ACES2065-1 with AP0 primaries is the wider archival sibling.

Use: VFX, color grading, modern film and HDR pipelines.
03

sRGB - the universal default

sRGB was defined by HP and Microsoft in 1996 and standardized as IEC 61966-2-1 in 1999. The goal was simple: a color space whose primaries matched typical CRT monitors and whose transfer function matched the rough 2.2-gamma response of those CRTs. With sRGB in place, untagged image files could be assumed to mean something specific, and the web could render color consistently.

Primaries (xy)
R: (0.640, 0.330), G: (0.300, 0.600), B: (0.150, 0.060).
White point
D65 at (0.3127, 0.3290).
Transfer function
Piecewise: linear below ~0.0031308, then 1.055·V1/2.4 − 0.055. Approximates gamma 2.2.
Bit depth
8 bits per channel is standard. 10/12 bits supported in modern formats.
Gamut coverage
~35% of the CIE 1931 chromaticity area. Cannot reach saturated cyans or greens.
Status
Web default. The fallback target every other space must be downconvertible to.
The sRGB transfer is not pure gamma 2.2. A common shortcut is to use a 2.2 power curve, but the specification is a piecewise function with a linear toe. The difference is small at most code values but becomes visible in deep shadows. Most modern color-management libraries implement the piecewise form correctly.
04

Adobe RGB - photography wide

Adobe RGB (1998) widens the green primary substantially while keeping sRGB's red and blue. The wider green captures saturated cyans and greens that occur in nature (foliage, water, cyan inks) and cannot be encoded in sRGB. For photographers whose output is print, where CMYK gamut overlaps these green-cyans, Adobe RGB preserves information that sRGB would clip.

Adobe RGB and sRGB share the D65 white point and use a similar gamma (~2.2). Conversion between them is a simple matrix transform. But the larger gamut spreads the same 8-bit code values over a wider color volume, so 8-bit Adobe RGB risks more visible banding than 8-bit sRGB. Most Adobe RGB workflows use 16-bit files.

05

ProPhoto RGB - archive

ProPhoto RGB (also called ROMM RGB) was designed by Kodak for archival photographic imaging. It uses imaginary primaries that lie outside the visible spectral locus - the same trick CIE used for XYZ. Its gamut covers about 91% of human chromaticities, including colors no device can reproduce but that may need to be preserved through the editing pipeline.

The catch: such a large gamut spreads the same numerical range over a much wider color volume. 8-bit ProPhoto bands aggressively, so the format effectively requires 16-bit encoding. ProPhoto also uses D50 (not D65) and gamma 1.8 (not 2.2), marking it as a print-oriented intermediate space rather than a display space.

"ProPhoto is a holding pen. You don't display it; you edit in it, then convert out to a display or print space for delivery." Editorial summary · ProPhoto in workflow
06

Display P3 - modern consumer

Display P3 took the DCI-P3 cinema primaries (wider than sRGB, especially in reds and greens) and recombined them with the D65 white point and sRGB-style transfer function. The result is a consumer-friendly wide-gamut space that maps cleanly onto modern display hardware. Apple pushed it heavily from 2015 onwards; Android, Chrome, Firefox, and Safari now all support it.

CSS Color Module Level 4 made Display P3 a first-class web color space: color(display-p3 1 0 0) renders the wide-gamut red on capable displays and falls back gracefully on sRGB displays. For most photo content shipping to consumers in 2026, Display P3 is the working space of choice.

07

Rec.709 and Rec.2020 - video

Rec.709 (ITU-R BT.709, 1990) is the HDTV equivalent of sRGB. Its primaries are essentially identical to sRGB - both inherit the same CRT-era phosphors - but its transfer function (BT.1886) and YCbCr encoding differ. Practical color difference between sRGB and Rec.709 is small.

Rec.2020 (ITU-R BT.2020, 2012) is its UHD/HDR replacement, with primaries placed on the spectral locus - the widest broadcast space possible. Few consumer displays achieve full Rec.2020 coverage, so HDR mastering typically happens inside a P3-D65 sub-volume within a Rec.2020 container. The container's BT.2100 HDR companion spec adds PQ (perceptual quantizer) and HLG (hybrid log-gamma) transfer functions designed for high dynamic range encoding.

BT.1886 transfer
SDR video gamma; pure power 2.4. Used for Rec.709 and SDR Rec.2020.
PQ (BT.2100)
Absolute-luminance HDR transfer, 0 → 10 000 nits. Standard for HDR10, Dolby Vision, and most streaming HDR.
HLG (BT.2100)
Relative HDR transfer designed for broadcast backward-compatibility. SDR-decoded HLG produces a usable SDR image.
YCbCr encoding
Luminance + two chroma channels. Used in video to allow chroma subsampling (4:2:0, 4:2:2) without much perceived loss.
08

Linear vs encoded RGB

Every RGB space has two forms: a linear form where pixel values are proportional to scene or display luminance, and an encoded form where values have been bent through a transfer function. Files almost always store encoded RGB - it makes 8-bit encoding visually adequate by allocating more code values to dark tones, where the eye is most sensitive.

Linear RGB is what you need for any physically correct operation: alpha compositing, blurring, color mixing, lighting calculations, gamma-correct rendering. Convert to linear, compute, then convert back to encoded for display. Skipping linearization is the single most common source of visible color bugs in graphics code.

Interactive 01 · Transfer functions

Compare encoded-to-linear curves across spaces

The plot overlays the encoding curves for sRGB, Rec.709 (BT.1886), Adobe RGB gamma 2.2, ProPhoto gamma 1.8, and an HDR PQ curve (compressed). Notice the different slopes at black - this is where each curve allocates its code values and where the perceptual differences live.

sRGB BT.1886 / Rec.709 Adobe γ 2.2 ProPhoto γ 1.8 Linear (identity) PQ HDR
x: encoded value 0-1 · y: linear-light fraction 0-1
Vlin = Vencodedγ   (approximate sRGB form) encoded values stored in files; linear values used for physical operations
09

White points across spaces

Three white points dominate the working spaces. D65 is used by sRGB, Adobe RGB, Display P3, Rec.709, Rec.2020 - essentially everything aimed at screens. D50 is used by ProPhoto, ICC PCS, and almost all print workflows. DCI (slightly green-shifted) is used by theatrical cinema. Mixing white points across a workflow without explicit chromatic adaptation produces silent color shifts.

D65
6504 K · screens
D50
5003 K · print, ICC PCS
D60
~6000 K · ACES
DCI
6300 K green-shifted
White-point mismatch is a silent bug. Convert a Rec.2020 (D65) file to ProPhoto (D50) by matrix alone and white drifts noticeably. Real conversions apply a chromatic adaptation transform (Bradford or CAT16) along with the primary matrix. ICC profiles encode this; raw-matrix conversion code often doesn't.
10

Bit depth and quantization

A color space and a bit depth must be chosen together. The same 8-bit channel allocates 256 levels regardless of the underlying space - so wider gamuts spread the same code values across a larger color volume. The result: 8-bit ProPhoto bands aggressively where 8-bit sRGB looks smooth. Higher gamuts demand higher bit depth.

Interactive 02 · Bit-depth banding

Watch a smooth gradient quantize to discrete steps

A black-to-saturated-color gradient at the chosen bit depth, encoded in the chosen space. Drop to 6 or 7 bits to see banding emerge clearly. The wider the space, the more bits required to keep the gradient smooth.

Levels available: 64  ·  smoothness verdict: visibly banded
8-bit / channel
256 levels. Adequate for sRGB encoded display. Risk of banding in wider gamuts.
10-bit / channel
1024 levels. Standard for HDR video, modern wide-gamut photography. Banding rarely visible.
12-bit / channel
4096 levels. Cinema mastering, high-end professional photography. Banding only visible in extreme grades.
16-bit / channel
65536 levels. ProPhoto and ACES intermediate. Allows aggressive editing without visible quantization artefacts.
Half-float (16-bit)
Floating-point storage. Supports HDR values above 1 and below 0. Standard in compositing pipelines.
Full-float (32-bit)
Scientific precision. Used for raw image data, photometric computation, and ground-truth references.
11

Converting between spaces

A correct RGB → RGB conversion has four steps:

Step 1: decode (Vencoded → Vlinear) via source transfer
Step 2: matrix-multiply (Source-linear-RGB → XYZ) via source's M
Step 3: matrix-multiply (XYZ → Dest-linear-RGB) via destination's M-1
Step 4: encode (Vlinear → Vencoded) via destination transfer plus chromatic adaptation if the white points differ

Skipping the linearization step (Step 1) and applying matrix math directly to gamma-encoded values is the most common mistake. It looks plausible but produces muddied saturated colors and shifted whites. The chromatic adaptation step is the second most common omission.

Interactive 03 · Round-trip converter

Convert a hex from one space to another

Pick a source space, target space, and a hex value. The system shows the intermediate XYZ, the destination's linear and encoded RGB, and the resulting hex. Try converting #ff0000 from Display P3 to sRGB - the result is a much less saturated red, because that level of red doesn't exist in sRGB.

Source (encoded)
255, 80, 80
Source (linear)
1.000, 0.077, 0.077
Intermediate XYZ
47.6, 25.5, 9.1
Destination (linear)
0.876, 0.135, 0.084
Destination (encoded)
243, 99, 79
Destination hex
#f3634f
Round-trip information preserved.
Space R (x, y) G (x, y) B (x, y) White Gamma
sRGB 0.640, 0.330 0.300, 0.600 0.150, 0.060 D65 ~2.2 (piecewise)
Rec.709 0.640, 0.330 0.300, 0.600 0.150, 0.060 D65 2.4 (BT.1886)
Adobe RGB 0.640, 0.330 0.210, 0.710 0.150, 0.060 D65 2.2
Display P3 0.680, 0.320 0.265, 0.690 0.150, 0.060 D65 ~2.2 (sRGB curve)
DCI-P3 0.680, 0.320 0.265, 0.690 0.150, 0.060 DCI (0.314, 0.351) 2.6
Rec.2020 0.708, 0.292 0.170, 0.797 0.131, 0.046 D65 2.4 / PQ / HLG
ProPhoto 0.7347, 0.2653 0.1596, 0.8404 0.0366, 0.0001 D50 1.8
12

Which space to use when

The space you pick depends on what you're delivering, not what you're capturing. Capture in the widest practical space, edit in something even wider, and convert down for delivery.

Web, social, untagged JPEG
sRGB. Anything else risks looking wrong on the majority of consumer screens.
Modern wide-gamut web
Display P3 via CSS Color 4 or tagged AVIF / JPEG XL, with sRGB fallback declared.
Photography for print
Edit in Adobe RGB or ProPhoto (16-bit). Convert to the print profile at output.
HDR video / streaming
Master in Rec.2020 container with PQ or HLG transfer. Real coverage usually inside P3-D65.
Cinema
DCI-P3 for theatrical, ACEScg for grading/compositing, archival in ACES2065-1 or ProPhoto.
Archival
ProPhoto or ACES2065-1, 16-bit minimum. Keep the raw file too if it's a primary asset.
"The right RGB space is whichever one you can convert out of cleanly to every destination you might need. The wrong one is the one you chose for capture that you later wish you hadn't." Editorial summary · workflow planning
13

Test your understanding

Six questions on RGB spaces, primaries, and transfer functions. Wrong answers come with brief explanations.

Quick check

Loading…
 
Question 1 of 6
14

Continue your journey