Quote:
Originally Posted by TomHuffman 
Casey:
I just realized that I had the math for the RGB-xyY conversion. I asked Greg Rogers about this and what he said rang a bell so I went back and looked at my spreadsheets and this was lurking there all along.
This at least shows how Lindbloom gets his numbers, though I don't suppose it helps to answer the question of why RGB-xyY gives different results than a straight linear calculation from the white point to the target color.
1. Start with the RGB values. I'll use 50% red (R100%, G50%, B50%) as an example.
2. Apply gamma to these values. I'll use 2.22. That's what Lindbloom uses. This results in R1.0, G0.2146, B0.2146
3. Use the same math we use for the xyY-RGB conversion, except instead of multiplying the gamma-corrected R,G,B by an inverted matrix of the XYZ of the selected gamut, you multiply by the actual XYZ of the selected gamut. For Rec. 709 that is:
For red, this results in the following XYZ values:
X0.5278
Y0.3816
Z0.2490
4. Convert this to xyY, which results in:
x0.456
y0.329
Y0.382
which is exactly what Lindbloom shows.

Casey:
I just realized that I had the math for the RGB-xyY conversion. I asked Greg Rogers about this and what he said rang a bell so I went back and looked at my spreadsheets and this was lurking there all along.
This at least shows how Lindbloom gets his numbers, though I don't suppose it helps to answer the question of why RGB-xyY gives different results than a straight linear calculation from the white point to the target color.
1. Start with the RGB values. I'll use 50% red (R100%, G50%, B50%) as an example.
2. Apply gamma to these values. I'll use 2.22. That's what Lindbloom uses. This results in R1.0, G0.2146, B0.2146
3. Use the same math we use for the xyY-RGB conversion, except instead of multiplying the gamma-corrected R,G,B by an inverted matrix of the XYZ of the selected gamut, you multiply by the actual XYZ of the selected gamut. For Rec. 709 that is:
Code:
R G B
1 0.41232 0.21260 0.01933
2 0.35760 0.71520 0.11920
3 0.18050 0.07220 0.95063
X0.5278
Y0.3816
Z0.2490
4. Convert this to xyY, which results in:
x0.456
y0.329
Y0.382
which is exactly what Lindbloom shows.
Tom, can you use your spreadsheet to calculate the xyY with gamma = 1? I wonder if that will yield our linear calculation results... which may be a clue.
















