# Musical notes and colors of a rainbow

I have wondered that in an octave in piano there are seven primary notes, and also we observe mostly seven primary colors of a rainbow. I know we perceive logarithmically, that means we only care about relative differences.

Is there any relation between $7$ musical notes (in an octave) and $7$ colors of a rainbow?

EDIT: I agree that the primary term for the $7$ notes in an octave is more or less the matter of taste. However, if we take the western musical taste as a guide, we can justify ourselves to use $12$ notes in an octave and place piano keys in the present way. Take a look at here.

• There's a mathematical explanation for 12 notes in an octave, as explained in your link. There's no explanation for 7 primary notes though, except that it sounds good and familiar to western ears. Mar 16, 2017 at 9:50
• @EricDuminil Okay, but take a look how he used the fraction $\frac{3}{2}$ to justify the $12$ notes in an octave. He certainly used the traditional western notes, that is why I called them primary and that's why piano keys are placed in the way we know as you said. There is an explanation for $7$ primary notes in my opinion if we want to take the western musical taste as a guide but I guess it's not a very important issue. I can agree with you in some senses. Mar 16, 2017 at 10:55
• Thanks for staying open-minded. A correct, mathematical explanation of 12 notes in an octave shouldn't use note names until the very end. First : octave, then fifths, then semi-tone, then 12 notes in an octave. At the end, name the notes as you wish, but it isn't a mathematical process anymore. Mar 16, 2017 at 11:06
• You can see here that musicians sometimes associate sounds with colours, but it's never a direct correspondence of wavelengths. Mar 16, 2017 at 12:01
• @Karlo Yes, the octave system doesn't work in colors. I asked about the relation in an octave. Mar 16, 2017 at 15:02

On the most basic level, the answer is a flat no. The seven primary notes in an octave is specific to the western musical tradition. It's not entirely arbitrary as you say, but there are many other choices that could have been made, and there are other cultures who use fewer notes (e.g. pentatonic scales in blues music) or more (e.g. Indian classical music). The seven colours in the rainbow are also somewhat arbitrary. (Are indigo and violet really different colours? Why don't we count aquamarine, right between green and blue?)

Having said that, it does happen to be the case that the range of frequencies we can see is just a little short of an octave, ranging from about 440-770 THz. This is really more or less a coincidence, but because of it, I can point out a relationship between light and colours, just for fun.

The A above middle C is defined, for modern instruments, as 440Hz. The A an octave above is 880Hz, and in general if we go $n$ octaves up we get a frequency of $440\times 2^n$. If we go forty octaves up from A we get a note of 483 THz. This can't be played as a sound wave (air can't vibrate at frequencies that are too high) but as an electromagnetic wave it's a slightly reddish orange.

If we go down a note to G we get $392\times 2^{40}$ Hz $= 431$ THz, which is just into the infra-red. (It might be possible to see it as a very deep red colour, but I'm not sure.) However, moving up from there we get the following colours:

• G - 431 THz - infra-red
• A - 483 THz - orange
• B - 543 THz - yellow-green
• C - 576 THz - green
• D - 646 THz - blue
• E - 724 THz - indigo
• F - 768 THz - violet (barely visible)
• G - 862 THz - ultra-violet

(I leave the sharps and flats as an exercise to the reader.) So you can't see G (or F#), but the other notes do actually have colours.

However, as I said this is just a bit of fun and does not in any way have any practical implications, since sounds at those frequencies can't be transmitted through air.

• This is one of my favorite answers in the whole Stack Exchange network! Now let me add that in real life this has no application. But for those who love superhero comics, the Green Lanterns once used this very same relationship to teach a blind member of their corps (Rot Lop Fan) how to use a power ring :) (though by mistake they told him to use F#, which would somewhere between violet and UV, instead of C...) Mar 16, 2017 at 14:05
• I think there's a suggestion that "blue" in the context of a rainbow actually refers to aquamarine and "indigo" to deep blue rather than any purplish colour. Mar 16, 2017 at 14:47
• I find it interesting that the colors versus the opposing ends of the visible spectrum become similar to each other again. It's easy to arrange the rainbow colors in a circle which is closed, the same way one can arrange notes in an octave. Not sure what the physiological base is for that -- the color receptors in the retina do not appear to have any sensitivity to, say, light of half their designated wavelength. Mar 17, 2017 at 15:19
• Of interest may be Alexander Sciabin; there is a color wheel associated with an octave in the "Philosophical influences and influence of colour" section. Mar 17, 2017 at 15:33
• @CiprianTomoiaga no, it can't be, because different synaethesiacs map different colours to each note (or letter, word etc.). Synaesthesia is a neurological/psychological phenomenon, not a physical one. Mar 19, 2017 at 10:32

There is a connection in the sense that Isaac Newton regarded both musical harmony and optical physics as branches of mathematics (Kepler did the same with harmony and astronomy, and this kind of thing was not original to them), and deliberately chose 7 rainbow colours to match the common Western scale, despite his poor eyesight initially only spotting 5 colours; he later added orange and indigo

Wikipedia's article on the rainbow says

Newton chose to divide the visible spectrum into seven colours out of a belief derived from the beliefs of the ancient Greek sophists, who thought there was a connection between the colours, the musical notes, the known objects in the Solar System, and the days of the week.

and includes a reference to a 2004 article by Niels Hutchison, MUSIC FOR MEASURE, On the 300th Anniversary of Newton's "Opticks"

• He should have just mapped the 5 onto a pentatonic scale
– Dave
Mar 16, 2017 at 17:23

Answer to this question varies significantly based on point of view.

Physics & Physiology: No, there is no connection. The mechanisms are quite different (EM vs. acoustic spectrum, eyes vs. ears etc.) and number 7 is arbitrary.

Musicology & Aesthetics: Number 7 isn't that important, because in an octave there is actually 12 notes if we adopt western model and it is not the only option, vision does not have an octave-principle etc. On the other hand, there are numerous theories (but in context of this site let's label them "analogies") about visible color and tone (e.g. from Newton himself). This notion (part of a bigger phaenomenon called synesthesia) is psychological and experience-based. It lies on no physical principle - well, other than: "Waves! It all fits together, ya know?!"

• "Arbitrary" does not mean "unimportant." The diatonic scale (seven notes based on certain simple frequency ratios) has been fundamental to Western music since prehistoric times. Why they stopped at seven tones? That's arbitrary. But those seven tones are the bedrock of western music theory. Mar 16, 2017 at 16:28

The physiology viewpoint: totally different mechanisms.

The cochlea performs a mechanical Fourier transform. To some extent, we hear wavelengths. We can see a detailed explanation in The Human Ear -- Hearing, Sound Intensity and Loudness Levels.

But we don't see wavelengths. The different (usually three) types of cone cells are more or less sensitive to different (objective) wavelengths. Each (subjective) color is the product of this three signals.

• Thanks for answer. Is there any physiology explanation for seeing 7 colors in a rainbow? Mar 17, 2017 at 8:07
• @Kiarash, names for colors $\ne$ colors (en.wikipedia.org/wiki/…). Some amazonian tribes have the same chromatic vision that other (excluding daltonic/tetrachromatic) humans and less names for colors. See es.slideshare.net/LaurenBurleson/…. And, actually, we have more than seven names for colors. Mar 17, 2017 at 8:22
• Got it. Thanks! Although colors trivially differs from their names, but it's very tempting because I actually feel around $7$ colors in a rainbow, maybe just because of culture and other reasons. Mar 17, 2017 at 8:32
• @Kiarash, I can't come up with a physiological reason for more than 5-6 colors (the three sensitivity peaks, plus the maxima for differences in sensitivity).
– Mark
Mar 17, 2017 at 22:12

What we perceive as colors are only a tiny fraction of the electromagnetic spectrum. An octave of piano notes represents a set of frequencies in the acoustic "spectrum" (light waves and sound waves are fundamentally different, by the way). The number 7 is arbitrary, we can name many more colors and we could define many more notes (on the piano we actually have 12 in an octave).

One more difference is that the rainbow contains the whole visible spectrum from red (large wavelength) to violet (short wavelength). Above and below that we are not able to perceive. One octave on the piano, on the other hand, is just one fraction. There are many octaves we are able to hear. The pattern repeats many times. Regarding 7/12 notes: music and physics yield a number of notes. But the number of colors in the rainbow is completely arbitrary. Where do you define boundaries between colors (e.g, yellow-green, bright-lime, citron)? It is continuous.

So from my perspective it is even more difficult to find relations than to find differences between "notes" and "colors".

Around 1665, when Isaac Newton first passed white light through a prism and watched it fan out into a rainbow, he identified seven constituent colors—red, orange, yellow, green, blue, indigo, and violet—not necessarily because that’s how many hues he saw, but because he thought that the colors of the rainbow were analogous to the notes of the musical scale.

Naming seven colors to correspond to seven notes is “a kind of very strange and interesting thing for him to have done,” says Peter Pesic, physicist, pianist, and author of the 2014 book Music and the Making of Modern Science. “It has no justification in experiment exactly; it just represents something that he’s imposing upon the color spectrum by analogy with music.”

Of his rainbow experiment Newton wrote that he had projected white light through a prism onto a wall and had a friend mark the boundaries between the colors, which Newton then named. In his diagrams, which showed how colors corresponded to notes, Newton introduced two colors—orange and indigo—corresponding to half steps in the octatonic scale. Whether Newton’s friend delineated indigo and orange on the wall or whether Newton added those colors to his diagrams in order to better fit his analogy is unclear, Pesic says. In any case, Newton’s inclusion of those two colors had lasting consequences, Pesic wrote in his book: “For those who came after, Newton’s musical analogy is the source of the widely held opinion that orange and indigo are actually intrinsic in the spectrum, despite the great difficulty (if not impossibility) of distinguishing indigo from blue, or orange from yellow, in spectra.”

Newton persisted with his color theory despite later data he had collected suggesting it was incorrect. When studying what are now called Newton’s rings—as seen, for example, in the rainbow of color in oily puddles—he noted that, according to the relationship between radii of colored rings, the range from red to violet was equivalent not to an octave but to something more like a major sixth. According to Pesic, rather than changing his theory to match the data, Newton came up with an erroneous explanation of how a major sixth was equivalent to an octave.

But as both musicians and physicists know, the two are not equivalent. In physics terminology, an octave is the frequency range from x to 2x, and that premise holds true for musical octaves. If light behaved like music, then photon frequencies of the spectrum would also range from x to 2x, and their wavelengths, inversely proportional to their frequencies, would too. Instead, the wavelengths of visible light range from 400 to 700 nanometers, which, if translated to sound waves, would be approximately equivalent to a major sixth, Pesic says.

Although Newton’s color-music analogy falls apart, his prism experiments showed that white light is actually a mix of different-colored lights, and this work was “a crucial step toward understanding the nature of light more deeply,” Pesic says. And even if you can’t make out indigo in the rainbow, you probably know ROY-G-BIV, which Pesic calls “a conventional expression of (and homage to) Newton’s choice [to name seven colors in analogy to music]—even though almost everyone has forgotten or did not know the odd story of its origin.”

• Please cite your sources since you have copied content verbatim Dec 3, 2021 at 7:09
• I admit this is content from the internet. While some parts are authored by me. Dec 3, 2021 at 7:10
• The citation should be explicit, with the quotations marked as such, otherwise it's plagiarism. Dec 3, 2021 at 8:15