We have all seen beautiful rainbows across the sky after rain. But how does a rainbow form? Rainbows are usually formed when sky is full of clouds and it is about to rain. In order for a rainbow to form, we need two things, rain and sun.
When we look at sunlight most of us think of it as just one color: white, clear or blue. Sunlight is actually made up of all colors of light. All colors, which we see in rainbow, are originally there in sunlight. However, we do not see them in sunlight because they are mixed together. In the same way, if you take blue and yellow paint and mix them on paper you will see green paint. This green paint, as you know, contains both blue and yellow color; however, you only see green. Sunlight is the same way: when you mix all the colors of light together you get white light or sunlight.
Now that we know so much about light, let's look at what else make rainbows: rain. Rain comes from clouds. Clouds in the sky contain millions and millions of tiny raindrops. Rainbows are caused by the bending of sunlight as it passes through the raindrops. The raindrops act like miniature prisms. As white light enters the prism, it is separated into the individual colors of light. Both prisms and raindrops separate light based on the wavelength of the light. Light moves in waves, just like the waves in the ocean, and each color has a different length of wave. The longer the wavelength the slower the light color moves, purple is the fastest light and red is the slowest. The spectrum, or band of colors which make up the "white light" leaves the prism as separate bands of color. The more slowly a wavelength of light travels, the more it is bent by the prism. That is why the colors seen in the rainbow are always in the order red, orange, yellow, green, blue, indigo, and violet. The red light travels more slowly than violet light so it is bent more.