Skip to content
Prev 67252 / 398502 Next

hex format

On Thu, 7 Apr 2005, Earl F. Glynn wrote:
Yes, and convertColor in R-devel does quite a few of these (XYZ 
tristimulus space; CIE Lab and Luv; sRGB, Apple RGB and roll-your-own 
RGB based on chromaticities of the primaries; and chromatic adaptation for 
changing the white point).  The "colorspace" package has a more elegant 
implementation of a somewhat different set of color space computations, 
and R-devel also has hcl() for specifying colors based on hue, chroma, and 
luminance (polar coordinates in Luv space).

Basing R graphics on these (and so making them colours rather than just 
data about colours) requires a further step of considering the 
characteristics of the output device. This might be as simple as declaring 
R's output to be sRGB or as complicated as worrying about ICC profiles.

 	-thomas