This mapping of wavelength to RGB value is very misleading: in particular, when moving to higher and higher frequencies, blue does not wrap around to red creating purple. The perceptual color space that we are used to working in by mixing pigments or various frequencies of light is independent of light frequency. Unlike all other colors in the rainbow, there is no single frequency that will activate both the red and blue cones within your eye to create purple; if you had a single frequency between blue and red, it would look green. Instead, you must have two disjoint frequencies both stimulating the red and blue cones simultaneously (note that this is not strictly true, as for some people, the red cones do have some response down in the blue range, but the amount of red response within the blue region is extremely weak, and will not give the sensation of purple that is shown in articles such as this one).<p>This is why rainbows do not have purple at the edge, and why prisms do not create purple; it is a "non-physical" color (I made that term up, but it hopefully makes sense given my explanation above).<p>For a more physically-sound mapping of wavelength to color, see the CIE XYZ color system [1]. In particular, in Figure 2, the "pure wavelengths" are given as points along the outside edge of the curved surface, and as you can see, purple does not exist along that outside edge.<p>For those interested in simulation of color, I highly recommend Jiahao Chen's old notebook "The Colors of Chemistry" [2], which goes through a lot of these concepts, and accurately simulates things like the color of solutions just from knowing their chemical composition. Truly fascinating stuff.<p>[1] <a href="http://www.fourmilab.ch/documents/specrend/" rel="nofollow">http://www.fourmilab.ch/documents/specrend/</a>
[2] <a href="https://github.com/jiahao/ijulia-notebooks/blob/master/2014-06-09-the-colors-of-chemistry.ipynb" rel="nofollow">https://github.com/jiahao/ijulia-notebooks/blob/master/2014-...</a>