Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rgb_spct

RGB color values


Description

This function returns the RGB values for a source spectrum.

Usage

rgb_spct(spct, sens = photobiology::ciexyzCMF2.spct, color.name = NULL)

Arguments

spct

an object of class "source_spct"

sens

a chroma_spct object with variables w.length, x, y, and z, giving the CC or CMF definition (default is the proposed human CMF according to CIE 2006.)

color.name

character string for naming the rgb color definition

Value

A color defined using rgb(). The numeric values of the RGB components can be obtained

See Also

Other color functions: w_length2rgb(), w_length_range2rgb()

Examples

rgb_spct(sun.spct)

photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.