What scientific phenomenon explains the appearance of the colors of a rainbow?
Refraction is the bending of light when light moves from one medium to another. For rainbows, light moves from air to water. The index of refraction (a measure of how far the light bends) is larger for blue light than green light, and larger for green light than yellow and so on. For this reason the water in the air acts like a prism producing a rainbow.