Converts hyperspectral reflectance signatures to sRGB hex codes and CIE L*a*b* coordinates using the CIE 1931 2-degree standard observer and the D65 standard illuminant. CIELAB coordinates are calculated directly from CIE XYZ values; sRGB output is generated independently. Includes bundled reference data so the package is self-contained. Handles missing and non-finite reflectance values via a configurable policy.
Convert hyperspectral reflectance signatures to sRGB hex codes and CIE Lab* colour coordinates, using the CIE 1931 2-degree standard observer and the D65 standard illuminant.
Developed for leaf-level plant phenotyping data from the PSI PlantScreen platform, but applicable to any reflectance spectra in the 400-700 nm range.
devtools::install_github("jelguerat/spectra2rgb")
If you use spectra2rgb in published work, please cite:
Elguera, J. (2026). spectra2rgb: Convert spectral signatures to sRGB and CIELAB colour coordinates (Version 0.1.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23255917
GPL (>= 3)