spec2rgb | R Documentation |
Calculates rgb values from spectra based on human colour matching functions.
spec2rgb(rspecdata, alpha = 1)
rspecdata |
(required) a data frame, possibly of class |
alpha |
alpha value to use for colours (defaults to 1, opaque). |
A character vector consisting of hexadecimal colour values for passing to further plotting functions.
Hugo Gruson hugo.gruson+R@normalesup.org
Chad Eliason cme16@zips.uakron.edu
CIE(1932). Commission Internationale de l'Eclairage Proceedings, 1931. Cambridge: Cambridge University Press.
data(teal)
spec2rgb(teal)
# Plot data using estimated perceived colour
plot(teal, col = spec2rgb(teal), type = "overlay")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.