[Radiance-general] CIE Color Conversion

Raphael Compagnon raphael.compagnon at eif.ch
Wed Jun 29 09:34:41 CEST 2005


Hi Marcs,

These are the formulas you need to convert from Yxy to radiance-rgb:

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;

Raphael

At 23.06.2005 21:20, you wrote:
>Hi All
>
>I have a question about using the existing utilities for converting a CIE 
>(x,y) chromaticity to RGB for use of adjusting the default sun and sky 
>colors. I have researched the following site to get some background about this:
>
>http://www.fourmilab.ch/documents/specrend/
>
> From searching through the archive of this message board I came across a 
> response by Greg to a previous question that I had for adjusting the sun color:
>
>http://www.radiance-online.org/pipermail/radiance-general/2005-January/002263.html
>
>My question is how may I convert from a CIE(x,y) chromaticity to RGB using 
>on two variables as was performed for the above. The Radiance function 
>file xyz_rgb.cal requires three variables (x,y and the luminosity, z). The 
>reason why I am asking this is because I wish for the values that I'll 
>employ to be in the physically valid range (i.e. .265074126*r + 
>.670114631*g + .064811243*b = 1).
>
>Thanks
>
>Marcus
>
>
>
>_______________________________________________
>Radiance-general mailing list
>Radiance-general at radiance-online.org
>http://www.radiance-online.org/mailman/listinfo/radiance-general




More information about the Radiance-general mailing list