According to this article in new scientist (https://www.newscientist.com/lastword/mg25133512-600-why-are-there-seven-colours-in-a-rainbow/) -


Our perception of a rainbow is coloured (pun intended) by our expectation that there are seven colours. In reality, there aren’t seven distinct bands, but multiple colours blending and shading into one another.

Around 1665, Isaac Newton performed experiments with a prism producing a spectrum in which he identified seven colours.

Prior to that, the spectrum had been thought to have five colours. For example, in his book Experiments and Considerations Touching Colours, Robert Boyle described the spectrum he produced with a prism as “denoting the five consecutions of colours Red, Yellow, Green, Blew, and Purple”.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence