Click or drag to probe coordinates. Gamut triangles overlay automatically for active spaces.
Export diagrams as images, or save colour-space definitions as JSON/CSV for use in other tools and workflows.
| Name | Area (xy) | % sRGB | Volume (Lab³) | Transfer | White |
|---|
Manage a local library of color spaces. Clone standards, edit custom variants, and import/export JSON definitions.
| Name | Type | White | Transfer | Actions |
|---|
Display & Broadcast
- IEC 61966-2-1 (1999) — sRGB colour space. Primaries identical to BT.709; defines the ubiquitous web/desktop gamut with a ~ 2.2 effective gamma.
- ITU-R BT.709-6 (2015) — HDTV parameter values. Specifies primaries (0.64, 0.33), (0.30, 0.60), (0.15, 0.06) and D65 white point.
- ITU-R BT.2020-2 (2015) — UHDTV wide-colour-gamut system. Near-spectral primaries covering ≈ 75.8% of CIE 1931 xy.
- ITU-R BT.2100-2 (2018) — HDR-TV. Defines PQ (ST 2084) and HLG transfer functions over BT.2020 primaries.
- SMPTE ST 2084 (2014) — Perceptual quantiser (PQ) EOTF for mastering displays, mapping 0–10 000 cd/m².
- ARIB STD-B67 (2015) — Hybrid Log-Gamma (HLG) OETF for broadcast-compatible HDR.
Cinema & VFX
- DCI-P3 (SMPTE RP 431-2) — Digital cinema projector gamut with a greenish-white (x 0.314, y 0.351) and γ 2.6.
- AMPAS ACES TB-2018-001 — Academy Color Encoding System. AP0 (ACES 2065-1) covers the entire visible locus; AP1 (ACEScg) is a practical working-space subset.
Photography & Print
- Adobe RGB (1998) — Wider-gamut display space popular in photography; γ 2.2, D65 white.
- ISO 12640-3 / ProPhoto RGB — ROMM RGB. Very wide gamut (covers ≈ 90% of real surface colours in CIELAB); γ 1.8, D50 white.
- Adobe Wide Gamut RGB — Near-locus primaries, D50 white; designed for high-fidelity colour reproduction.
Legacy
- NTSC (1953) — Original US television primaries. Wider green than sRGB; Illuminant C white point.
- PAL / SECAM (EBU) — European broadcast primaries, nearly identical to sRGB but with a γ 2.8 assumption.
Colorimetry Foundations
- CIE 15:2004 — Colorimetry, 3rd ed. Defines CIE 1931 2° and CIE 1964 10° standard observers, xy chromaticity, D-series illuminants.
- CIE 170-1:2006 — Fundamental chromaticity diagram with physiological axes (cone-fundamental-based).
- ICC.1:2022 (v4.4) — ICC profile specification. Profile Connection Space uses D50-adapted CIEXYZ; gamut mapping intents.
CIE 1931 xy Chromaticity
y = Y / (X + Y + Z)
CIE 1976 u′v′ uniform chromaticity:
v′ = 9Y / (X + 15Y + 3Z)
RGB ↔ XYZ Matrix Derivation
Given primaries (x_R, y_R), (x_G, y_G), (x_B, y_B) and white (X_W, Y_W, Z_W):
- Convert xy → XYZ: X_i = x_i/y_i, Y_i = 1, Z_i = (1−x_i−y_i)/y_i
- Form M with columns [X_R X_G X_B], [Y_R Y_G Y_B], [Z_R Z_G Z_B]
- Solve S = M¹ · [X_W Y_W Z_W]⊃T
- M_rgb2xyz = M · diag(S_R, S_G, S_B)
- M_xyz2rgb = (M_rgb2xyz)¹
sRGB OETF (Gamma Encoding)
V = 1.055 × C_lin^(1/2.4) − 0.055 otherwise
ST 2084 PQ EOTF
Maps encoded V to absolute luminance Y (cd/m², max 10 000):
m₁=0.1593, m₂=78.844, c₁=0.836, c₂=18.852, c₃=18.688
HLG OETF
E > 1/12: V = a×ln(12E − b) + c
a = 0.17883277, b = 1−4a, c = 0.5−a×ln(4a)
Gamut Area — Shoelace Formula
Coverage % reported relative to sRGB triangle area.
Monte Carlo Gamut Volume
Estimate the CIELAB volume enclosed by the gamut boundary:
- Generate N quasi-random (Halton) samples in the Lab bounding box [0,100]×[−128,128]².
- For each sample, convert Lab → XYZ → linear RGB; test 0 ≤ R,G,B ≤ 1.
- V ≈ (in-gamut / N) × (100 × 256 × 256) Lab³.
Gamut Overlap (Jaccard Index)
Computed via Halton sampling in CIE xy; point-in-triangle classification for each gamut.
Color Space Standards
IEC 61966-2-1 — sRGB colour space (1999)
ITU-R BT.709 — HD parameter values (sRGB-like OETF, D65, primaries)
ITU-R BT.2020 — UHDTV system parameters (Rec.2020 wide-gamut primaries)
ITU-R BT.2100 — HDR image parameters (PQ & HLG)
SMPTE ST 2084 — High dynamic range EOTF for mastering displays
ARIB STD-B67 — Hybrid Log-Gamma (HLG) system
AMPAS ACES TB-2018-001 — ACES colorimetry (AP0, AP1 / ACEScg)
ISO 12640-3 — ProPhoto RGB colour space
Chromaticity & Matrices
CIE 15:2004 — Colorimetry, 3rd ed. (CMFs, xy chromaticity, D-series illuminants)
CIE 170-1:2006 — Fundamental chromaticity diagram with physiologically significant axes
Lindbloom (2003) — XYZ ↔ RGB matrix derivation for arbitrary primaries. brucelindbloom.com
Wyszecki & Stiles (1982) — Color Science: Concepts and Methods, 2nd ed. Wiley
Transfer Function References
Miller & Smith (2014) — Perceptual signal coding for more efficient usage of bit codes. SMPTE 2014 Annual Technical Conference
Poynton (2012) — Digital Video and HDTV Algorithms and Interfaces, 2nd ed. Morgan Kaufmann
Fairchild (2013) — Color Appearance Models, 3rd ed. Wiley
Gamut Volume & Mapping
Morovic (2008) — Color Gamut Mapping. Wiley
Green & MacDonald (2002) — Colour Engineering: Achieving Device Independent Colour. Wiley
Bottosson (2020) — OKLab: A perceptual color space for image processing. bottosson.github.io
About This Tool
Gamut Lab implements custom gamut design, CIE 1931 xy & 1976 u′v′ chromaticity diagrams, RGB↔XYZ matrix derivation, transfer function curves, Monte Carlo gamut volume, gamut slice visualisation, and library management — all client-side, zero dependencies.
The CIE 1931 xy diagram shows standard gamut triangles overlaid on the spectral locus. Larger triangles enclose more of the visible spectrum.
| Space | Area (xy) | % sRGB |
|---|---|---|
| sRGB / BT.709 | 0.0639 | 100% |
| Display P3 | 0.0847 | ~133% |
| Adobe RGB | 0.0717 | ~112% |
| Rec. 2020 | 0.1448 | ~227% |
| ACES AP0 | ~0.24 | ~375% |
| ProPhoto RGB | 0.1600 | ~250% |
Transfer functions map between encoded (signal) values and linear light. Key differences:
- sRGB: Piece-wise function with a linear toe segment (≤ 0.04045), effective γ ≈ 2.2.
- PQ (ST 2084): Perceptual quantiser for HDR; 0 → 10 000 cd/m² with near-JND spacing.
- HLG: Hybrid log-gamma; backward-compatible with SDR on conventional displays.
- Pure gamma: γ = 1.8 (ProPhoto), 2.2 (Adobe RGB), 2.4 (BT.1886), 2.6 (DCI).
MacAdam (1942) measured 25 chromaticity discrimination ellipses across the CIE diagram, revealing that the xy plane is not perceptually uniform. Sizes are typically magnified 10× for visibility.
The CIE 1976 u′v′ diagram partially corrects this non-uniformity — ellipses appear more circular — but perfect uniformity requires perceptual spaces like CIELAB or OKLab.
Monte Carlo volume estimation converges as O(1/√N). For 10 000 samples, typical relative error is ±1–2%. Halton quasi-random sequences reduce variance compared to pseudo-random sampling by ~3×.
For higher accuracy, increase sample count or switch to stratified sampling with jittered grids in Lab space.
Three mapping intents are implemented:
- Clip: Hard clamp to [0, 1]. Fast, preserves in-gamut colours; may cause hue shifts at the boundary.
- Scale: Uniform luminance-preserving scale by max(|R|,|G|,|B|). Maintains ratios but compresses chroma globally.
- Perceptual: Sigmoid rolloff above 1.0; asymptotes smoothly. Preserves shadow detail but lightens highlights.
ICC-style perceptual rendering intents typically use CIECAM02-based J,a_M,b_M compression along hue-preserving lines (Morovic 2008).
ACES AP0 places the blue primary at (0.0001, −0.077) — outside the spectral locus. This “imaginary” primary allows the triangle to completely enclose all real colours. The resulting XYZ-to-RGB matrix produces negative linear RGB for some visible colours; these are valid scene-referred values in the ACES pipeline.
CIELAB (1976) was designed for surface colours under D65; its uniformity degrades in saturated regions and at extreme lightness. OKLab (Bottosson 2020) improves hue linearity and chroma uniformity, producing rounder, more symmetric gamut slices — especially useful for sRGB and Display P3 boundary visualisation.