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 (in equal temperament) and multiply them by 240 (40 octaves), you get a number in the THz, which would fall into the visual range if it represented 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|
I used this Python code to generate the RGB values for each wavelength, and Wolfram Alpha to find the nearest named HTML color. Should find the nearest color names from the XKCD color survey instead (and “nearest” should be defined as distance in L*a*b* space, not in RGB space).
Since the starting point of F♯ is arbitrary, basically all this means is that our visual range covers about 1 octave. Our audible range is 9–10 octaves, for comparison.