Displaying 1 result from an estimated 1 matches for "soil_xyz".
2006 Mar 02
1
extracting RGB values from a colorspace class object
...soil_colors", header=F,
col.names=c("H","V","C","x","y","Y"))
#convert to XYZ
X <- (soil$x * soil$Y ) / soil$y
Y <- soil$Y
Z <- ( (1- soil$x - soil$y) * soil$Y ) / soil$y
#make an XYZ colorspace object:
require(colorspace)
soil_XYZ <- XYZ(X,Y,Z)
#visualize the new XYZ colorspace object in the L*U*V colorspace:
plot(as(soil_XYZ, "LUV"), cex=2)
here is an example of the output:
http://169.237.35.250/~dylan/temp/soil_colors-LUV_space.png
Somehow the plot() method in the colorspace package is converting color spac...