rgbToXyz

fun rgbToXyz(@Size(value = 3) rgbIn: DoubleArray, @Size(value = 2) redChromaticity: DoubleArray, @Size(value = 2) greenChromaticity: DoubleArray, @Size(value = 2) blueChromaticity: DoubleArray, @Size(value = 2) whiteChromaticity: DoubleArray, @Size(value = 3) refOut: DoubleArray): DoubleArray

Calculates XYZ from linear RGB given chromaticity coordinates of RGB working space primaries and reference whites of RGB and XYZ value.

Return

XYZ value, unity scale, with reference white refOut (element order X, Y, Z)

Parameters

rgbIn

Input linear RGB value, unity scale (element order R, G, B)

redChromaticity

RGB space red primary chromaticity coordinates (element order x, y)

greenChromaticity

RGB space green primary chromaticity coordinates (element order x, y)

blueChromaticity

RGB space blue primary chromaticity coordinates (element order x, y)

whiteChromaticity

RGB space reference white/grey chromaticity coordinates (element order x, y)

refOut

Selected reference white of output XYZ color, unity scale (element order Xref, Yref, Zref)