"Rainbows are the result of well-known physics. When light enters at an angle into a substance where it travels more slowly (like a prism), different wavelengths are bent differently. This effect is called dispersion. Since color depends on wavelength, we see this as a band of different colors.
The shorter wavelengths (violet and blue) are bent the most, the longer wavelengths (red and orange) are bent the least.
Isaac Newton experimented on dispersion by glass prisms. His experiments demonstrated that color is a property of the light itself; colored objects don’t generate color, they absorb or reflect light that is already colored.
Newton designated seven colors to the rainbow by analogy with the seven notes of the musical scale: red, orange, yellow, green, blue, indigo, and violet, hence the mnemonic initialism ROYGBIV.
A careful reading of Newton’s work indicates that the color he called indigo, we would normally call blue; his blue is then what we would name blue-green or cyan.
Also, dispersion can be produced from water drops, including rain. The drops also reflect the light, so we normally see rainbows only if we are between the sun and the raindrops.
The reflection also explains why the sequence seems reversed: violet on the inside and red on the outside.
Yet we can also see smaller rainbows with mist and sea spray."
AIG