My very fuzzy recollection is it was this specrend code that was behind the oops of a "The Universe is green!" NYTimes front-page(?) article - someone's research generated spectra, and for PR they derived a color using off-the-web code, but didn't recognize the bogosity of the output value. Red-shifted faces.
The Wikipedia discussion of violet[1] currently seems plausible - yay. Unlike the "Black-body radiation" article,[2] which again has a CIE chromaticity diagram with a blackbody curve going through yellow and missing white, which is indicative of broken whitepoint math. Oh well.
> This mapping of wavelength to RGB value is very misleading
As is so much science education content. It can be fun to imagine how different science learning might be if content wasn't so broken.
[1] https://en.wikipedia.org/wiki/Violet_(color) [2] https://en.wikipedia.org/wiki/Black-body_radiation
About purple, recently I've been looking at pictures of rainbows, and one in particular caught my attention, it shows several (I believe 5) concentric rainbows. The order of the colors alternate on each rainbow, so of the outermost rainbow has red on the outside, the one right next to it has blue on the outside and red on the inside. Then if you look at the intersections or the space in between rainbows, it looks purple.
What makes that space look purple? And what makes the color order alternate?
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).
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.
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.
[1] http://www.fourmilab.ch/documents/specrend/ [2] https://github.com/jiahao/ijulia-notebooks/blob/master/2014-...