There are really only six colours of the rainbow, the three primary colours, (red, yellow and blue), and the three secondary colours, (orange, green and purple). In fact, rainbows don’t have distinctive colour bands, they span the spectrum of “pure” colours visible to the human eye. We perceive this spectrum as the primary and secondary colours interspersed, (red, orange, yellow, green, blue and purple), and all the hues in between.
So why did we learn “Richard Of York Gave Battle *In* Vain” at school?
Well, they were a superstitious bunch back in the 17th century, and Sir Isaac Newton, (mathematician, astronomer, scientist and all-round genius), was no exception. He knew there were 7 days in the week, 7 wonders of the world and 7 celestial bodies in the (known) solar system. In the Bible, God rested on the 7th day, there were 7 deadly sins and 7 heavenly virtues. The Book of Revelation alone mentions 7 churches, 7 angels, 7 seals, 7 trumpets and 7 stars, the list goes on…
Sir Isaac Newton himself was convinced that there should be 7 colours in the spectrum, and that they were somehow inexplicably tied to the 7 notes in a musical scale, with orange and indigo forming two half steps in the octave. So when he came to published the original color wheel in 1704 he included musical notes in the diagram, correlating to the 7 colours in his circle. And that is why we have red, orange, yellow, green, blue, indigo, and violet!