The color we call "yellow" is what you get when the red and green cones are reporting fairly equal amounts of stimulus. It generally corresponds to the wavelengths between them. Similarly, "cyan" or "light blue" is the green and blue cones reporting fairly similar amounts of light. That color is also between the peaks of those cone's responses.
And then there is "magenta" or "purple". Which is what you get when the red and blue cones are reporting light. This does not correspond to any particular wavelength of light. But inside your brain it still produces a sensation of color, that has similarities to the red and blue experiences.
This is why some people like to say that "purple is not a real color": it does not correspond to a single particular wavelength of light. But really "color" is just something your brain makes up to classify different combinations of excitement of the rods and cones in your eyes anyway; the reality is that our eyes are only sensitive to a tiny fragment of the electromagnetic spectrum, with an uneven distribution - the "red" and "green" cones have a lot of overlap in their sensitivity, while "blue" barely overlaps either. Have a look at the diagrams in Wikipedia's page on "trichromacy": https://en.wikipedia.org/wiki/Trichromacy
This is also why all our displays are based on red, green, and blue lights: you can fool the brain into sensing a particular color by showing the eyes nothing but the three frequencies the cones are most sensitive to, in various amounts.
It's a weird artifact of how the brain reconstructs wavelength from the measurements taken by the retina.
The retina has three types of color-sensitive cells (cones). Each one carries a light-absorbing protein that absorbs only certain wavelengths of light. Photopsin I has maximal absorption around 530nm (a sort of yellowish green) and some absorbption towards higher wavelengths, up to 700nm (the red end of the spectrum). Photopsin II has maximal absorption around 530nm as well (so it's green too), but unlike Photopsin I, its absorption drops off rapidly, and does not go toward red. Photopsin III, however, peaks in low wavelengths, around blue.
Even though the peak responses of Photopsin I and II are very similar, the brain can use absorption ratios to detect wavelength.
If your Photopsin I is absorbing some light, but your Photopsin II isn't, the brain deduces that your retina must be being illuminated by red light.
If both Photopsins I and II are absorbing a lot of light, the brain deduces that you're seeing some shade of green (this is why we can tell greens apart better than other colors: we have two receptors for it, but only one for the other colors).
If only Photopsin III is absorbing light, but the other two aren't, your brain deduces that your retina is being illuminated by high frequency blue light.
Other color perceptions arise as combinations of different wavelengths. If all your Photopsins are absorbing light, the brain deduces that you're seeing a combination of all visible frequencies, white light (this is why prisms can split white sunlight, and why we have rainbows). Similarly, If only Photopsins I and III are absorbing, you must be seeing a combination of red and blue light, which is what you see as purple. And that's why purple appears to interpolate smoothly between red and blue.
Okay, but where does violet fit in? Violet isn't purple (a combination of different wavelength light sources), but a pure low wavelength light. Why does _violet_ also appear to interpolate between red and blue? Well, Photopsin I has its absorption maximum around green - but it happens to have a smaller absorption peak in low wavelengths, around 400nm as well. So very low wavelength blue light is absorbed by both Photopsin I AND Photopsin III: and your brain deduces incorrectly that your retina is illuminated by some combination of blue and red. And that's why violet looks similar to purple, and the color wheel appears to wrap around as wavelength decreases.
The range of the electromagnetic spectrum we see is indeed very close to "an octave" if defined as the doubling of frequency, but it makes no particular sense to consider the harmonies of octaves of visual light when there is only one of them.
The first thing that came to mind was "complementary colors", which are two colors opposite each other on the color wheel.
> They create the most contrast and therefore greatest visual tension by virtue of how dissimilar they are.
- From https://en.wikipedia.org/wiki/Harmony_(color)
This is like "tritones" in music, which are two notes with an interval spanning six semitones. If there was such a thing as a "note wheel" with a circumference of an octave (12 semitones), two notes that form a tritone are opposite each other on the wheel.
---
There are "split-complementary colors".
> Split-complementary colors are like complementary colors, except one of the complements is split into two nearby analogous colors.
> This maintains the tension of complementary colors while simultaneously introducing more visual interest with more variety.
..And "analogous colors", three colors that are next to each other on the color wheel, and a tertiary.
A musical equivalent of these might be like different types of chords.
---
Also, there are "triads", like primary and secondary colors.
> Art education materials commonly use red, yellow, and blue as primary colors, sometimes suggesting that they can mix all colors.
> A secondary color is a color made by mixing of two primary colors in a given color space.
However, such spectral sensitivity graphs vary a lot (perhaps because people's vision does, but also they'll be measuring things differently): https://duckduckgo.com/?q=retina+cone+frequency+response&atb...