The spectra below were generated using different
RGB
values for wavelengths between 380nm and 780nm. This was done by using
a FORTRAN program that uses linear
approximations for the RGB
color coefficients. Alphabet Systems used this FORTRAN program to make their
JavaScript Visible Spectrum.
The CIE XYZ chromaticity diagram below was created using
a FORTRAN program
that computes
the red, green and blue color coefficients for each coordinate (x,y).
For another approach, see the UNIX cietoppm utility which is a NETPBM extension.
The diagram below was created using
a FORTRAN program
that computes
the red, green and blue color coefficients for hot objects. The program
uses the CIE color matching functions and Planck's distribution function for
the spectral radiance of a blackbody.
Someone has now converted the FORTRAN code into C code.
The three white curves below indicate the sensitivity level for the three types of cones. The black curve indicates the sensitivity of the rods[1]. The peak response moves from 550 nm to 500 nm at night.[2].