Skip to content
Prev 325270 / 398503 Next

grDevices::convertColor XYZ space is it really xyY?

Ken, I followed your suggestion and perhaps I don't understand what to expect from convertColor or maybe I'm not using it correctly.  Consider the following tests:

D65 <- c(0.3127, 0.329, 0.3583) # D65 chromaticity coordinates
X <- D65[1]*D65[3]/D65[2] # conversion per brucelindbloom.com
Y <- D65[3]
Z <- D65[3]*D65[3]/D65[2]
XYZ <- data.frame(X = X, Y = Y, Z = Z) # D65 in tristimulus values (?)
colnames(XYZ) <- c("X", "Y", "Z")

tst1 <- convertColor(XYZ, from = "XYZ", to = "sRGB")
tst2 <- convertColor(D65, from = "XYZ", to = "sRGB")
# none of these are 1,1,1, namely white (they are ~ 0.6, 0.6, 0.6)

So it looks like D65, a white standard, does not come back to something near white in the sRGB space.  What am I doing wrong here, or what do I misunderstand?  Please don't say everything!

Thanks, Bryan
On Jun 12, 2013, at 2:57 PM, Ken Knonlauch <ken.knoblauch at inserm.fr> wrote: