[Radiance-general] CIE xyY to Radiance rgb Conversion

Marcus Jacobs marcdevon at hotmail.com
Tue Oct 18 21:04:52 CEST 2005


Dear Group

I have come across an issue regarding converting colors from CIE xyY color 
space to Radiance's rgb. From the post:

http://www.radiance-online.org/pipermail/radiance-general/2005-June/002783.html

and from RWR, the conversion is as follows:

X=x*Y/y;
Z=(1-x-y)*Y/y;
r=  2.565*X -1.167*Y -0.398*Z;
g= -1.022*X +1.978*Y +0.044*Z;
b=  0.075*X -0.252*Y +1.177*Z;

However, when I attempt a conversion the color seems way off. For example, 
the color x =  0.3304 , y = 0.3582 , Y = 0.9822 which I expect to be a faint 
yellow converts to rgb = 0.838, 1.05, 0.825, which is more of a faint green. 
I have used another script found in the following paper:

http://aesl.hanyang.ac.kr/resource/radiance/rstds.pdf

The rgb.cal script in this paper list the following for xyY to rgb 
conversion:

X=x*Y/y;
Z=(1-x-y)*Y/y;
r= 2.739*X -1.145*Y -0.424*Z;
g= -1.119*X +2.029*Y +0.033*Z;
b= 0.138*X -0.333*Y +1.105*Z;


Although not always spot on, its much closer to the aforementioned (the 
previous example converts to rgb = 0.995,1.01,0.74 which is a faint yellow 
with a slight green tint). Thanks for any help and/or advice. As a note I 
should mention that I use the following online calculator to convert from 
0-255 rgb color space to CIE xyY color space:

http://www.easyrgb.com/calculator.php



Regards,

Marcus





More information about the Radiance-general mailing list