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.
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.
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.
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.
What "RGB" really means
Three things are routinely conflated under the label "RGB." All of them matter.
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.
color(display-p3 1 0 0) means something different from
color(srgb 1 0 0).
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)
The default for the web, untagged JPEGs, most consumer monitors, and almost everything that says "RGB" without further qualification.
Rec.709 (ITU-R BT.709, 1990)
HDTV broadcast and Blu-ray. Same primaries as sRGB; slightly different transfer function. Almost identical gamut to sRGB.
Adobe RGB (1998)
Wider green than sRGB; same red and blue primaries. Designed for photographers who needed CMYK-printable green-cyan that sRGB couldn't represent.
Display P3 (Apple, 2015)
DCI-P3 primaries with the D65 white point and sRGB transfer function. Used by Apple devices and most modern wide-gamut displays.
DCI-P3 (SMPTE 431-2, 2007)
Same primaries as Display P3 but with a slightly green-shifted "DCI white" and a different gamma. The digital cinema reference.
Rec.2020 (ITU-R BT.2020, 2012)
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.
ProPhoto RGB (ROMM RGB)
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.
ACEScg / ACEScct (AMPAS)
Cinema compositing and grading spaces. AP1 primaries cover most of the visible gamut. ACES2065-1 with AP0 primaries is the wider archival sibling.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Converting between spaces
A correct RGB → RGB conversion has four steps:
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.
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
| 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 |
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.
Test your understanding
Six questions on RGB spaces, primaries, and transfer functions. Wrong answers come with brief explanations.
Quick check
Continue your journey
Additive and Subtractive Color Mixing
The additive model these RGB working spaces are built on.
Colorimetry · 37Gamut Mapping: Clipping, Compression, Rendering Intents
What happens when a wide-gamut color won't fit the smaller space.
Foundations · 01What Color Is and How Humans See It
The cornerstone explainer connecting light, surface, eye, brain, and standards.
Physics · 04Spectral Power Distributions and Why RGB Is Not Enough
The spectra behind every RGB triple.
Colorimetry · 08CIE XYZ Explained
The reference frame every RGB matrix maps to and from.
Colorimetry · 09CIELAB and LCH Explained
The perceptually scaled space used for difference and palette work.
Colorimetry · 10Chromaticity Diagrams Without the Intimidation
The horseshoe and the gamut triangles you've been comparing.
Colorimetry · 11Metamerism Explained
Why narrow-band primaries in modern wide-gamut displays amplify observer disagreement.