Package-level declarations

Functions

Link copied to clipboard
fun linearToReflectance(rgb: ColorRGBa): DoubleArray

Converts a linear RGB color into a reflectance spectrum represented as a DoubleArray. The resulting reflectance spectrum spans 38 wavelength samples and is computed using spectral upsampling based on predefined spectral distributions.

Link copied to clipboard
fun mixSpectral(color1: ColorRGBa, color2: ColorRGBa, t: Double, k1: Double = 0.0, k2: Double = 0.0): ColorRGBa

Blends two colors spectrally by interpolating their reflectance spectra and returns the resulting color. This method uses spectral upsampling, Saunderson correction, and concentration factors to compute the resulting color in the RGB color space.

Link copied to clipboard
fun reflectanceToXYZ(reflectance: DoubleArray): ColorXYZa

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