color(x, ...)
## S3 method for class 'default':
color(x, ...)
## S3 method for class 'numeric':
color(x, type = "CMF", ...)
## S3 method for class 'list':
color(x, short.names = TRUE, type = "CMF", ...)
## S3 method for class 'waveband':
color(x, short.names = TRUE, type = "CMF", ...)
## S3 method for class 'source_spct':
color(x, type = "CMF", ...)
## S3 method for class 'source_mspct':
color(x, ..., idx = !is.null(names(x)))
default
: Default method (returns always "black").numeric
: Method that returns Color definitions corresponding to
numeric values representing a wavelengths in nm.list
: Method that returns Color of elements in a list.waveband
: Color at midpoint of awaveband
object.source_spct
:source_mspct
:wavelengths <- c(300, 420, 500, 600, NA) # nanometres
color(wavelengths)
color(waveband(c(300,400)))
color(list(blue = waveband(c(400,480)), red = waveband(c(600,700))))
color(numeric())
color(NA_real_)
color(sun.spct)
Run the code above in your browser using DataLab