xyz chromaticity matrix
for colorspace
rgb
x
y
z

xyz
white point
for colorspace
xW
yW
zW
XYZ
white point
for colorspace
XWS
YWS
ZWS

xyz-1
Achromatic vector
sr
sg
sb
M (RGB to XYZ)
M-1 (XYZ to RGB)
T-1   (Inverse chromatic transform)
XYZ
white point
post-adapted
XWD
YWD
ZWD

L   (Cone reponse scaling)
T   (Chromatic transform)

C   (Chromatic adaptation matrix)
= T-1 x L x T
RGB 8bitRGB scaledRGB gammaXYZ pre-adaptedpostadaptedX'Y'Z'R'G'B' gamma R'G'B' scaledR'G'B' 8bit