In Mathematica, producing a color based on its RGB parameters is easy; one can use (for example)
Graphics[{RGBColor[0.8, 0.6, 0.5], Rectangle[]}, ImageSize -> 100]
or
Image[{{{0.8, 0.6, 0.5}}}, Automatic, ColorSpace -> "RGB", ImageSize -> 100]
This produces a square as follows:
The range of values for each of the r, g, b
parameters are from 0 to 1
, as listed in the documentation. Any value of out of this range will be clipped.
However, if I would like to produce a color based on its CIE XYZ color, I can still do as follows
Image[{{{0.8, 0.6, 0.5}}}, Automatic, ColorSpace -> "XYZ", ImageSize -> 100]
Note that the color produced will be visually different since the XYZ
color space is different from that of the RGB
color space.
My question is, do you know what are the range of values for each of the X, Y, Z
parameters? I can't find this in the existing documentation. I was thinking of checking the range of values by trial and error (changing one parameter and seeing whether the values are clipped by comparing the results visually), but I hope there's a better way to do this or that there was some documentation that I missed.
Note: The online EasyRGB calculator limits the X, Y, Z
parameters from 0 to 95.047, 0 to 100, 0 to 108.883
respectively, and I'm suspecting that the limits for Mathematica would be simply 1/100 of these limits. Would like some verification on this if possible, though.