Mô đun:SpectralColor/tài liệu
Đây là một trang con tài liệu sử dụng bản mẫu dành cho Mô đun:SpectralColor. Nó gồm có các thông tin hướng dẫn sử dụng, thể loại và các nội dung khác không thuộc về phần trang mô đun gốc. |
This module generates the 'rgb(r,g,b)' HTML code of the approximate color of a given wavelength.
Sử dụng[sửa mã nguồn]
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)
Ghi chú : Bảng màu xuất phát từ Tập tin:Spectrum-sRGB-low.svg. Tables are big and by step of 2 nm, so interpolation is not necessary
Ví dụ[sửa mã nguồn]
- 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
- {{#gọi:SpectralColor|lambdacolor|589}} gives 'rgb(255,145,0)'