Modul:Bak pasir/Hidayatsrf/SpectralColor/doc
This module generates the 'rgb(r,g,b)' HTML code of the approximate color of a given wavelength.
Usage
suntingexported 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
sunting- Spectral lines of mercury 405 nm(ultraviolet), <span style="background-color:Galat skrip: tidak ada modul tersebut "SpectralColor".">436 nm, <span style="background-color:Galat skrip: tidak ada modul tersebut "SpectralColor".">546 nm and <span style="background-color:Galat skrip: tidak ada modul tersebut "SpectralColor".">a doublet near 578 nm
- <span style="background-color:Galat skrip: tidak ada modul tersebut "SpectralColor".">Triplet of magnesium near 517 nm
- <span style="background-color:Galat skrip: tidak ada modul tersebut "SpectralColor".">Doublet of sodium near 589 nm
- <span style="background-color:Galat skrip: tidak ada modul tersebut "SpectralColor".">Spectral line Hα of hydrogen at 656 nm
- {{#invoke:SpectralColor|lambdacolor|589}} gives 'Galat skrip: tidak ada modul tersebut "SpectralColor".'