As far back as Ancient Greece, Aristotle had his scale of seven colours. Later, Isaac Newton constructed a colour circle, originally divided into five, but he later added orange and indigo to match the number of musical notes in the major scale.
Now we have mnemonics to help us remember those seven colours: whilst Richard Of York, was Giving Battle In Vain in the UK, Roy G Biv was hard at work in the US. And if you fancy something rather more old-fashioned you can try Rinsing Out Your Granny’s Boots In Vinegar!
If you have a rainbow colour mnemonic in your own language I would love to hear about it in the comments.