Color & Display

RGB Primaries & White-Point Matrix Calculator

Derive a linear RGB-to-XYZ matrix from three chromaticity primaries and a reference white.

How the calculation works

Form primary columns (x/y,1,(1−x−y)/y). Solve the 3×3 system for scales that reproduce the chosen white XYZ. Multiply each primary column by its scale.

Worked example

Example inputs — Red primary x: 0.64; Red primary y: 0.33; Green primary x: 0.3; Green primary y: 0.6; Blue primary x: 0.15; Blue primary y: 0.06; White x: 0.3127; White y: 0.329. Expected results — Linear RGB→XYZ matrix rows: 0.412390799, 0.357584339, 0.180480788 0.212639006, 0.715168679, 0.072192315 0.019330819, 0.11919478, 0.950532152; Red Y scale: 0.2126390059; Green Y scale: 0.7151686788; Blue Y scale: 0.07219231536; xy primary-triangle area: 0.11205 xy².

Assumptions and limits

Mathematical color model with stated reference conventions; device calibration, viewing conditions and color-management profiles affect practical appearance. XYZ is relative with white Y=1; input RGB must be linear light. Rejects degenerate primaries and whites outside their nonnegative mixture. The xy triangle area is a geometric measure, not perceptual gamut volume or spectral realizability. Does not construct an ICC profile or apply a transfer curve.

Reference and further reading

Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.

Related calculators

Browse all 1000 calculators →

Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.