This is the documentation page for Module:SpectralColor
This module generates the 'rgb(r,g,b)' HTML code of the approximate color of a given wavelength.
Usage
exported function :
Lambdacolor(frame)– returns the "rgb(r,g,b)" code of the wavelength given as first argument
Uses :
mw.frame– args[1] = longueur d'onde en nanomètres (entier)
Note : The color tables comes from File:Spectrum-sRGB-low.svg. Tables are big and by step of 2 nm, so interpolation is not necessary
Examples
- Spectral lines of mercury 405 nm(ultraviolet), 436 nm, 546 nm and a doublet near 578 nm
- Triplet of magnesium near 517 nm
- Doublet of sodium near 589 nm
- Spectral line Hα of hydrogen at 656 nm
- {{#invoke:SpectralColor|lambdacolor|589}} gives 'rgb(255,145,0)'
