RGBToXYZ

open fun RGBToXYZ(@IntRange(from = 0, to = 255) r: Int, @IntRange(from = 0, to = 255) g: Int, @IntRange(from = 0, to = 255) b: Int, outXyz: @NonNull Array<Double>)(source)

Convert RGB components to its CIE XYZ representative components.

The resulting XYZ representation will use the D65 illuminant and the CIE 2° Standard Observer (1931).

  • outXyz[0] is X [0, 95.047)
  • outXyz[1] is Y [0, 100)
  • outXyz[2] is Z [0, 108.883)

Parameters

r

red component value [0, 255]

g

green component value [0, 255]

b

blue component value [0, 255]

outXyz

3-element array which holds the resulting XYZ components