XYZfromRGB( c(128,200,255, 0,0,0, 255,255,255), max=255 )$XYZ * 100
## X Y Z
## [1,] 47.60334 53.11601 102.3549
## [2,] 0.00000 0.00000 0.0000
## [3,] 95.04559 100.00000 108.9058
XYZfromRGB( c(128,200,255, 0,0,0, 255,255,255), space='Adobe', max=255 )$XYZ * 100
## X Y Z
## [1,] 42.36398 50.82876 103.8704
## [2,] 0.00000 0.00000 0.0000
## [3,] 95.04559 100.00000 108.9058
Run the code above in your browser using DataLab