wav2RGB: Converts light wavelengths to RGB colors

Description Usage Arguments Value Author(s) References Examples

View source: R/wav2RGB.R

Description

Converts wavelengths in nanometers into corresponding visible colors.

Usage

1
  wav2RGB(wav)

Arguments

wav

Numeric vector of wavelengths (in nanometers) to convert into colors.

Value

Returns a character vector of the same length as wav, with an RGB color for each wavelength. Wavelengths out of visible ranges return black.

Author(s)

Sylvain Mareschal

References

http://codingmess.blogspot.fr/2009/05/conversion-of-wavelength-in-nanometers.html

Examples

1
2
  wv <- seq(from=300, to=800, by=10)
  plot(x=wv, y=rep(1, length(wv)), col=wav2RGB(wv), pch=19)

MLPA documentation built on May 2, 2020, 1:06 a.m.