w_length2rgb | R Documentation |
Calculates rgb values from spectra based on human color matching functions
w_length2rgb(w.length, sens = photobiology::ciexyzCMF2.spct, color.name = NULL)
w.length |
numeric Vector of wavelengths [ |
sens |
chroma_spct Used as chromaticity definition. |
color.name |
character Used for naming the rgb color definition. |
A vector of colors defined using rgb()
. The numeric values of
the RGB components can be obtained using function col2rgb()
.
Other color functions:
rgb_spct()
,
w_length_range2rgb()
col2rgb(w_length2rgb(580))
col2rgb(w_length2rgb(c(400, 500, 600, 700)))
col2rgb(w_length2rgb(c(400, 500, 600, 700), color.name=c("a","b","c","d")))
col2rgb(w_length2rgb(c(400, 500, 600, 700), color.name="a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.