Calculates rgb values from spectra based on human colour matching functions.
Usage
spec2rgb(rspecdata, alpha = 1)
Arguments
rspecdata
(required) a data frame, possibly an object of class rspec
that has wavelength range in the first column, named 'wl', and spectral measurements in the
remaining columns.
alpha
alpha value to use for colors (defaults to 1, opaque).
Value
A character vector consisting of hexadecimal colour values
for passing to further plotting functions.
References
CIE(1932). Commission Internationale de l'Eclairage Proceedings, 1931. Cambridge: Cambridge University Press.