The RGB-XYZ Matrix Calculator


Enter the tristimulus values or chromaticity coordinates for an RGB color space.
(Note:  if you copy three values separated by spaces and/or commas, you can paste them into any of the three-component X, Y, Z or matrix fields on this page all at once.)
Click “generate” to generate the matrices and white point.

  X Y Z
white: 
red: 
green: 
blue: 
generate | | clear
  x y
white: 
red: 
green: 
blue: 
generate | clear

RGB-XYZ matrix:   XYZ-RGB matrix:   Reference white:
Chromatic adaptation (chad) matrix:

Of note, the color values displayed by Photoshop’s custom RGB may not match those displayed by the ICC Profile Inspector or Argyll’s iccdump.  The reference white in the ICC file header is always D50, and even the value in the wtpt (white point) tag may be chromatically adapted to a D50 working space.  The value may be “decoded” if there is a chromatic adaptation (chad) tag.  Enter a chad matrix in the fields to the left to use them with the X, Y, Z caluculations above.  In case you thought color management was an exact science, the values obtained by these methods, and those specified by an application such as i1Profiler when generating a profile, may all be different.  The default values above are those for ProPhoto2255; X, Y, and Z are from the ICC Profile Inspector, and x, y are from Photoshop.

 

Save the data in the X, Y, Z, x, y, and chad fields above to reload them:




A few simple white point calculators:

x y   X Y Z temp
convert to X, Y, Z:  
X Y Z   temp
calculate color temperature:  


A 3×3 matrix inverter:

 
 
 
invert

The equations for most of the above may be found at Bruce Lindbloom’s site.

Should you need to brush up on your matrix math, see Matrix multiplication and Inversion of 3×3 matrices at Wikipedia.


iccdump.exe -v3 -t wtpt -t rXYZ -t gXYZ -t bXYZ -t chad C:\Windows\System32\spool\drivers\color\monitor817563_5275.icm
XYZArray:
  No. elements = 1
    0:  0.964203, 0.999985, 0.825195    [Lab 99.999410, 0.003041, -0.024881]
XYZArray:
  No. elements = 1
    0:  0.445770, 0.238647, 0.025528    [Lab 55.952120, 76.481857, 61.263777]
XYZArray:
  No. elements = 1
    0:  0.367859, 0.718781, 0.056503    [Lab 87.909859, -85.248152, 97.323371]
XYZArray:
  No. elements = 1
    0:  0.150574, 0.042557, 0.743164    [Lab 24.499300, 94.689210, -123.336852]
S15Fixed16Array:
  No. elements = 9
    0:  1.017868
    1:  0.009171
    2:  -0.019760
    3:  0.011887
    4:  0.994797
    5:  -0.006729
    6:  -0.003616
    7:  0.005890
    8:  0.901245