WavelengthToColor - Maple Help

ColorTools

 WavelengthToColor
 create a color corresponding to a wavelength of light

 Calling Sequence WavelengthToColor(wavelength)

Parameters

 wavelength - in nanometers

Options

 • method = "linear" or "table"
 Choose between a more accurate table lookup conversion (the default) and a common linear approximation.
 • space=string designating a known color space
 Specify an output color space other than "RGB".

Description

 • The WavelengthToColor command creates a new Color structure which corresponds to the color of a light with the given wavelength.  Wavelengths that do not correspond to visible colors will return as black.

Examples

 > $\mathrm{with}\left(\mathrm{ColorTools}\right):$
 > $\mathrm{WavelengthToColor}\left(300\right)$
 ${⟨}\colorbox[rgb]{0,0,0}{{RGB : 0 0 0}}{⟩}$ (1)
 > $\mathrm{WavelengthToColor}\left(570\right)$
 ${⟨}\colorbox[rgb]{1,0.87843137254902,0}{RGB : 1 0.878 0}{⟩}$ (2)
 > $\mathrm{WavelengthToColor}\left(570,\mathrm{method}="linear"\right)$
 ${⟨}\colorbox[rgb]{0.858823529411765,1,0}{RGB : 0.857 1 0}{⟩}$ (3)

Compatibility

 • The ColorTools[WavelengthToColor] command was introduced in Maple 18.