Compute colours for a list of narrow wavebands or a range of wavelengths.
fast_wb2rect_df(w.band, chroma.type = "CMF", simplify = TRUE)
A data frame with columns "x", "y", "w.length", "wb.color", "wl.high", "wl.low".
waveband or list of waveband objects. The waveband(s) determine
the wavelengths in variable w.length
of the returned spectrum.
character telling whether "CMF", "CC", or "both" should be
returned for human vision, or an object of class chroma_spct
for any
other trichromic visual system.
logical Flag indicating whether to merge neighbouring rectangles of equal color.
Function fast_wb2rect_df()
computes colours for
wavebands based on the midpoint wavelength and uses vectorization when
possible. It always returns color definitions with short names. The purpose
of merging of rectangles is to speed up rendering and to reduce the size of
vector graphics output. This function should be used with care as the color
definitions returned are only approximate and original waveband names can
be lost.
Function fast_wb2rect_df()
intended use is when colour definitions
are needed in a simple data frame as in the compute functions of
statistics that return colours.