Learn R Programming

photobiology (version 0.9.6)

w_length_range2rgb: Wavelength range to rgb color conversion

Description

Calculates rgb values from spectra based on human color matching functions

Usage

w_length_range2rgb(w.length, sens = photobiology::ciexyzCMF2.spct,
  color.name = NULL)

Arguments

w.length
numeric Vector of wavelengths (nm) of length 2. If longer, its range is used.
sens
chroma_spct Used as the chromaticity definition
color.name
character Used for naming the rgb color definition

Value

  • A vector of colors defined using rgb(). The numeric values of the RGB components can be obtained using function col2rgb().

See Also

Other color functions: rgb_spct, s_e_irrad2rgb, w_length2rgb

Examples

Run this code
col2rgb(w_length_range2rgb(c(500,600)))
col2rgb(w_length_range2rgb(550))
col2rgb(w_length_range2rgb(500:600))

Run the code above in your browser using DataLab