The 7 color rainbow traces back to Isaac Newton. He was the first to study the spectrum from white light. From what I’ve read, he may have started with 6 colors but thought there should be 7 colors because of 7 planets then known, 7 days in the week, 7 musical notes, etc. The sources I’ve read don’t mention him acknowledging 7 being God’s number. I don’t know if that’s suppressed or not. Newton went off the deep end towards the end of his life, but in the middle I think he was more God-honoring.
In the history of colors, for a long time orange didn’t have it’s own name but was yellow-red. This is why the color is named after the fruit. Many primitive societies had no word for blue. I like the 7-color rainbow, although the word for indigo would be better if it were one of two syllables.