The most commonly seen rainbows are caused when sunlight is bent by rain droplets (if the sun gets bent by spray, for example off the crest of a wave, it’s technically called a ‘spray bow’). The sunlight travels into the water droplet and get refracted (bent), it then gets reflected inside the water droplet (as the water acts a bit like a mirror) and bent again when it leaves. In this way the droplet acts as a prism and causes the light to spread out into its full visible spectrum – from red through to violet. The amount of bending depends on the frequency of the light, which is why violet and blue are bent more than red.
If you’re lucky you might also see a double rainbow, where the second outer ‘bow is caused by the light being refracted into a water droplet and then reflected twice before being refracted on exiting the droplet. Because of this double reflection the colours are always reversed (violet to red this time) and it’s not as bright. The darker area of sky between the two rainbows is called ‘Alexander’s Band’, after Alexander of Aphrodisias who was a philosopher in Ancient Greece.
Pretty! (There aren’t any riches or leprechauns though. Sorry about that.)
A similar effect causes the sky to be blue. When you look at the blue parts of the sky you are actually seeing light from the sun that was going to miss the earth entirely. However, light can get scattered by the atoms in the atmosphere and this scattering redirects some of it towards the ground. Blue is scattered more than red, so you see a blue colour! On the other hand, sunsets are red because when you look almost at the sun, only light which hasn’t been scattered much reaches your eyes. So that would be the red colours! Now you know what to say when a child asks you the age old question “Why is the sky blue?”.
The featured image was borrowed and edited, with thanks, from Nicholas A. Tonelli under a Creative Commons licence.