[R] [OT] two question about color space.

Jinsong Zhao jszhao at mail.hzau.edu.cn
Mon Mar 16 11:04:51 CET 2009

> Thanks for pointing this out, i did check the available packages before 
> dwelling on this but i was focussed on the first part of the problem 
> (spectrum to xyz). 
> The available convertColor() function is especially welcome that it was 
> the most inefficient part of the code I produced yesterday. When I've 
> cleaned up the spectrum_to_xyz() function, I'll ask the maintainers of 
> colorspace if they want to include it.
> Many thanks,
> baptiste

Thank you, baptiste.

I have read several programs related with spectrum to XYZ those days. 
The efficient way to do spectrum to xyz, is query form the color 
matching functions (CMFs) directly, and interpolate the input wavelength 
in the CMFs. The higher resolution CMFs (1nm) could be obtained from 

It seems that convertColor() using the CIE 1931 2 degree CMFs.[1] And I 
don't find a way to convert color using CIE 1964 10 degree CMFs, because 
the RGB color space parameters available is only based on CIE 1931 2 
degree CMFs.[2]



More information about the R-help mailing list