Aristotle believed that rainbows were made up of just three colours: red, green and violet. He said that sometimes, you can also see yellow, but this is just "due to contrast for the red is whitened by its juxtaposition with green." He was sadly unaware of refraction and so tried to explain rainbows purely in terms of reflection, which is tricky. Does a cloud look like a gigantic ball of mirrors to you? Ibn al-Haitham introduced the idea of refraction (along with camera obscura, possibly) and totally re-invented optics towards what we know today. He way cool. Isaac Newton was convinced there were seven colours in the rainbow, so he made up the name "indigo" for one of them.
In fact, we can see around seven million colours in the rainbow, though we don't yet have names for all of them. A UN-sponsored project, headquartered in Sweden, is collating every colour name used in every language spoken (and as many extinct languages as can be analysed). The aim is to come up with a definitive list of all 7 million visible shades.