A mapping between musical notes and colors

Filed under: Uncategorized
Created 09/15/2010 (9:28 pm) | Updated 09/16/2010 (2:20 pm)

bpert said:

If you take A = 440 Hz and keep doubling and doubling until you get into the range of light you will find ROYGBIV = F, G, A, Bb, B, C, D, E, F. Try it yourself.

So I did!  If you take the frequencies of each note in Hz and multiply them by 240 (40 octaves), you get a number in the THz, which would fall into the visual range if it represents the frequency of an electromagnetic wave instead of a sound wave. “A typical human eye will respond to wavelengths from about 390 to 750 nm.” Does it match up with ROYGBIV? Kinda.

Note Freq (Hz) +40 oct. (THz) Wavelength (nm) R G B Color HTML name
F#4 370 407 737 174 0 0 dark red
G4 392 431 696 255 0 0 red
G#4 415 457 657 255 0 0 red
A4 440 484 620 255 102 0 orange-red
A#4 466 513 585 255 239 0 yellow
B4 494 543 552 153 255 0 chartreuse
C5 523 575 521 40 255 0 lime
C#5 554 610 492 0 255 242 aqua
D5 587 646 464 0 122 255 sky blue
D#5 622 684 438 5 0 255 blue
E5 659 725 414 71 0 237 blue
F5 698 768 390 99 0 178 indigo

I used this Python code to generate the RGB values for each wavelength, and Wolfram Alpha to find the nearest named HTML color.