reflectanceToXYZ

fun reflectanceToXYZ(reflectance: DoubleArray): ColorXYZa(source)

Converts a reflectance spectrum represented as a DoubleArray to a color in the CIE XYZ color space.

This method calculates the XYZ color by performing a dot product operation between the reflectance spectrum and the CIE color matching functions (CIE_CMF_X, CIE_CMF_Y, CIE_CMF_Z). The result is returned as a ColorXYZa object.

Return

A ColorXYZa object representing the corresponding color in the CIE XYZ color space.

Parameters

reflectance

An array of reflectance spectrum values, typically spanning the visible spectrum. This is represented as a DoubleArray with 38 wavelength samples.