| Nits | In-gamut % | Neutral Jz | Max Cz | Note |
|---|---|---|---|---|
| Computing… | ||||
Compare sRGB, Display P3, and Rec. 2020 at the same Jz and nits. Shows in-gamut percentage and maximum Cz side-by-side.
| Gamut | In-gamut % | Max Cz | Area ratio |
|---|---|---|---|
| sRGB | - | - | 1.00× |
| Display P3 | - | - | - |
| Rec. 2020 | - | - | - |
What is a JzAzBz Slice?
A slice is a 2D cross-section through a 3D colour space. JzAzBz has three axes: Jz (lightness), Az (green–red), Bz (blue–yellow). The Az–Bz chromatic plane fixes Jz at a constant value and shows every possible chromaticity at that lightness. The Jz–Cz lightness-chroma slice fixes the hue angle and plots lightness against chroma.
Slices reveal the gamut boundary — the region where colours are representable in a target display standard (sRGB, Display P3, Rec. 2020). They also expose HDR gamut shift: as peak luminance increases, the JzAzBz gamut boundary reshapes due to the PQ transfer function.
SMPTE ST 2084 — Perceptual Quantizer (PQ)
SMPTE ST 2084 defines the PQ EOTF (Electro-Optical Transfer Function) for HDR content. It maps signal code values to absolute luminance (0–10 000 cd/m²) using a power curve designed around the Barten visual model for contrast sensitivity.
JzAzBz uses PQ internally: LMS cone signals are PQ-encoded before the opponent transform. This ensures perceptual uniformity across the full HDR range, unlike CIELAB which is only valid for a narrow luminance span around 100 cd/m².
Specification: SMPTE ST 2084:2014 / ITU-R BT.2100
ITU-R BT.2100 — HDR Television
ITU-R BT.2100 specifies two HDR transfer functions: PQ (perceptual quantizer, SMPTE ST 2084) and HLG (hybrid log-gamma). Both use the Rec. 2020 colour primaries.
HLG reference white is 203 cd/m² (75% signal). PQ reference white is scene-dependent but 203 cd/m² is the recommended reference white for PQ content as well (ITU-R BT.2408). This tool defaults to 203 nits as the "standard" HDR reference level.
IEC 61966-2-1 — sRGB Standard
IEC 61966-2-1:1999 defines the sRGB colour space: D65 white point, specific red/green/blue primaries, and a two-part gamma curve (linear segment below 0.04045, power 2.4 above). sRGB covers approximately 35% of visible colours.
In this tool, sRGB is the default gamut. The inverse matrix (XYZ D65 → linear sRGB) determines the in-gamut boundary on the Az–Bz plane.
Display P3 (DCI-P3 adapted to D65)
Display P3 uses the DCI-P3 primaries with a D65 white point (instead of DCI's theatrical green-tinted white). Adopted by Apple for macOS, iOS, and iPadOS. Covers approximately 25% more area in CIE xy than sRGB.
In JzAzBz space, Display P3's wider red and green primaries create a noticeably larger gamut boundary, especially at mid-lightness (Jz ≈ 0.3–0.5).
ITU-R BT.2020 — Ultra-HD Wide Colour Gamut
Rec. 2020 (ITU-R BT.2020) specifies ultra-wide colour primaries for UHD television. It covers approximately 75.8% of CIE 1931 xy visible colours, versus 35.9% for sRGB and 45.5% for Display P3.
In JzAzBz, Rec. 2020 produces dramatically larger chromatic boundaries at all lightness levels, but current display hardware cannot reproduce the full Rec. 2020 gamut.
CIE 15:2004 — Colorimetry Fundamentals
CIE 15:2004 defines the CIE 1931 2° Standard Observer, XYZ colour matching functions, CIELAB, and D-series illuminant computation. While JzAzBz extends beyond CIELAB's luminance range, it builds on the same CIE XYZ foundation.
JzAzBz Forward Transform (Safdar et al. 2017):
Step 1: Pre-adaptation (remove blue/green dependence):
X' = b·X - (b-1)·Z where b = 1.15
Y' = g·Y - (g-1)·X where g = 0.66
Step 2: XYZ to LMS via Safdar matrix:
|L| | 0.41478972 0.579999 0.01464800| |X'|
|M| = |-0.20151000 1.120649 0.05310080| |Y'|
|S| |-0.01660080 0.26480000 0.66847990| |Z |
Step 3: PQ encode each cone channel:
L' = PQ(L), M' = PQ(M), S' = PQ(S)
Step 4: Opponent transform:
Iz = 0.5·L' + 0.5·M'
Az = 3.524000·L' - 4.066708·M' + 0.542708·S'
Bz = 0.199076·L' + 1.096799·M' - 1.295875·S'
Step 5: Perceptual lightness:
Jz = (1+d)·Iz / (1+d·Iz) - d₀
where d = -0.56, d₀ = 1.6295499532821566e-11
Chroma and hue:
Cz = √(Az² + Bz²)
hz = atan2(Bz, Az) [0-360°]
JzAzBz Inverse Transform (Jz,Az,Bz → XYZ abs):
Iz = (Jz + d₀) / (1 + d - d·(Jz + d₀))
Step 2: Inverse opponent → PQ-encoded LMS:
L' = Iz + 0.1386050433·Az + 0.0580473162·Bz
M' = Iz - 0.1386050433·Az - 0.0580473162·Bz
S' = Iz - 0.0960192420·Az - 0.8118918960·Bz
Step 3: PQ decode (using LUT for performance):
L = PQ⁻¹(L'), M = PQ⁻¹(M'), S = PQ⁻¹(S')
Step 4: Inverse Safdar matrix → pre-adapted XYZ:
|X'| | 1.9242264358 -1.0047923126 0.0376514023| |L|
|Y'| = | 0.3503167621 0.7264811939 -0.0653844229| |M|
|Z | |-0.0909828110 -0.3127282905 1.5227665613| |S|
Step 5: Reverse pre-adaptation:
X = (X' + (b-1)·Z) / b
Y = (Y' + (g-1)·X) / g
Result: [X, Y, Z] in absolute cd/m²
PQ Electro-Optical Transfer Function (SMPTE ST 2084):
Y_d = max(Y, 0) / 10000
Y_m = Y_d^m₁
E = [(c₁ + c₂·Y_m) / (1 + c₃·Y_m)]^m₂
PQ Decode (signal → luminance):
E_p = E^(1/m₂)
num = max(E_p - c₁, 0)
den = c₂ - c₃·E_p
Y = 10000 · (num / den)^(1/m₁)
Constants:
m₁ = 2610 / 16384 = 0.1593017578125
m₂ = 2523 / 4096 × 128 = 78.84375
c₁ = 3424 / 4096 = 0.8359375
c₂ = 2413 / 4096 × 32 = 18.8515625
c₃ = 2392 / 4096 × 32 = 18.6875
L_max = 10 000 cd/m²
XYZ D65 → Linear RGB Inverse Matrices:
| 3.2404542 -1.5371385 -0.4985314|
|-0.9692660 1.8760108 0.0415560|
| 0.0556434 -0.2040259 1.0572252|
Display P3 (DCI-P3 D65):
| 2.4934969 -0.9313836 -0.4027108|
|-0.8294890 1.7626641 0.0236247|
| 0.0358458 -0.0761724 0.9568845|
Rec. 2020 / BT.2020:
| 1.7166511880 -0.3556707838 -0.2533662814|
|-0.6666843518 1.6164812366 0.0157685458|
| 0.0176398574 -0.0427706133 0.9421031212|
Gamut test: if all three linear RGB values ∈ [0, 1]
(with ε = 5×10⁻⁴ tolerance), the colour is in-gamut.
PQ Look-Up Table Rendering Optimisation:
At 160×160 = 25 600 pixels, that's 76 800 pow() calls.
Solution: Pre-build Float32Array LUT at startup:
PQ_DEC_LUT = new Float32Array(4097)
for i = 0..4096:
E = i / 4096
PQ_DEC_LUT[i] = PQ_decode(E)
Fast decode:
pqDecodeFast(E) = PQ_DEC_LUT[(E × 4096) | 0]
Cost: 4097 × 4 bytes = 16 KB RAM, built once.
Savings: 76 800 × Math.pow() → 76 800 × array lookup.
Similarly, sRGB gamma LUT (Uint8Array, 2048 entries)
converts linear → 0-255 byte without per-pixel pow().
XYZ to CIELAB (CIE 15:2004):
f(t) = 7.787·t + 16/116 otherwise
L* = 116 · f(Y/Yn) - 16
a* = 500 · [f(X/Xn) - f(Y/Yn)]
b* = 200 · [f(Y/Yn) - f(Z/Zn)]
D65 white point: Xn=0.95047, Yn=1.00000, Zn=1.08883
OKLab (Ottosson 2020):
l = 0.4121656120·R + 0.5362752080·G + 0.0514575653·B
m = 0.2118591070·R + 0.6807189584·G + 0.1074065790·B
s = 0.0883097947·R + 0.2818474174·G + 0.6302613616·B
Cube root:
l' = cbrt(l), m' = cbrt(m), s' = cbrt(s)
Opponent:
L = 0.2104542553·l' + 0.7936177850·m' - 0.0040720468·s'
a = 1.9779984951·l' - 2.4285922050·m' + 0.4505937099·s'
b = 0.0259040371·l' + 0.7827717662·m' - 0.8086757660·s'
- Absolute luminance: JzAzBz requires absolute luminance in cd/m². The "peak nits" parameter converts sRGB-relative XYZ to absolute by multiplying by nits. A mismatch between your display and the nits setting affects perceived accuracy.
- PQ LUT quantisation: The 4096-step LUT introduces <0.02% error vs exact pow(). Imperceptible visually but may appear in high-precision numerical comparisons.
- Gamut boundary approximation: Binary in/out test with 5×10⁻⁴ tolerance. Edge pixels near the boundary may show half-pixel artefacts at low render resolution.
- No spectral rendering: All computation is tristimulus-based (XYZ). Metamerism, observer variability, and spectral rendering intents are not modelled.
- Display dependency: Results depend on your monitor's colour profile and peak luminance. True HDR visualisation requires an HDR-capable display in HDR mode.
- Canvas bilinear upscaling: At "Fast" quality (80 px), boundaries appear smoothed. Use "High" (300 px) for publication-quality renders.
JzAzBz Colour Space
[2] Safdar, M., Hardeberg, J.Y., Ronnier Luo, M. (2018). ZCAM, a colour appearance model based on a high dynamic range uniform colour space. Optics Express, 29(4), 6036-6052.
Perceptual Quantizer (PQ) / HDR Standards
[4] SMPTE ST 2084:2014. High Dynamic Range Electro-Optical Transfer Function of Mastering Reference Displays.
[5] ITU-R BT.2100-2 (2018). Image parameter values for high dynamic range television for use in production and international programme exchange.
[6] ITU-R BT.2408-4 (2021). Guidance for operational practices in HDR television production.
Display Colour Gamut Standards
[8] SMPTE RP 431-2:2011. D-Cinema Quality — Reference Projector and Environment (DCI-P3).
[9] ITU-R BT.2020-2 (2015). Parameter values for ultra-high definition television systems for production and international programme exchange.
[10] Anderson, M., Motta, R., Chandrasekar, S., Stokes, M. (1996). Proposal for a Standard Default Color Space for the Internet — sRGB. Proc. IS&T/SID 4th Color Imaging Conference, 238-246.
Colour Appearance & Perceptual Uniformity
[12] CIE (2004). Colorimetry, 3rd Ed. CIE 15:2004.
[13] Ottosson, B. (2020). A perceptual color space for image processing. https://bottosson.github.io/posts/oklab/
[14] Hunt, R.W.G. & Pointer, M.R. (2011). Measuring Colour, 4th Ed. Wiley.
About this tool
This tool implements the JzAzBz forward and inverse transforms with PQ LUT acceleration, multi-gamut boundary visualisation, hue-wheel and gamut-area analytics, batch multi-hue analysis, and CIELAB/OKLab coordinate readouts — entirely client-side (zero network). Not a substitute for calibrated measurement or official CIE/ITU software.
Surveys maximum in-gamut chroma (Cz) at every 5° hue angle for the current Jz, nits, and gamut. Produces a complete hue-chroma profile with statistics (mean, median, min, max, peak/trough hue) and an exportable histogram.
| Hue | Max Cz | In-gamut |
|---|---|---|
| Click "Run Batch Survey" to analyse all hue angles. | ||
Research note: As peak luminance increases, a given sRGB colour occupies a smaller fraction of the PQ-encoded JzAzBz space. The gamut boundary shifts inward relative to the overall space capacity.
100 cd/m²: Jz ≈ 0.184, Cz ≈ 0.046
203 cd/m²: Jz ≈ 0.166, Cz ≈ 0.040
1000 cd/m²: Jz ≈ 0.130, Cz ≈ 0.029
10000 cd/m²: Jz ≈ 0.085, Cz ≈ 0.017
Implication: HDR-mastered content occupies a
compressed region of JzAzBz vs SDR-mastered content.
JzAzBz was designed to be more perceptually uniform than CIELAB across a wider luminance range (0–10 000 cd/m²). Safdar et al. (2017) tested against the Luo–Rigg dataset and found improved hue linearity and reduced chroma-dependent lightness shifts compared to CIELAB and IPT.
CIELAB: 0.52 (poor above 500 cd/m²)
IPT: 0.45
JzAzBz: 0.38 (best across 0-10k cd/m²)
Note: JzAzBz is not a colour appearance model —
it does not model viewing conditions, surround,
or chromatic adaptation. Use ZCAM or CAM16 for those.