Rain bow, rainbow in the sky,Pretty colours up so high.
Oh, I wish that it would stayBringing colour everyday. ……
………… Jean Warren
What exactly is a rainbow?
Ali:- It is not an object but an appearance.
Nelly:-But then we cannot just see light, there has to be an object.
Ali:- There is some sense in that argument. In this case light comes from a large number of tiny water droplets. Only one colour comes to your eyes from one tiny drop. The colour you see from a bubble will depend on the angle of vision.
Early morning, when the sun is low, if you look at a drop of dew on a flower petal, you will be able to see it in different colours. The light coming from the sun is really a mixture of colours. The colours depend on the wave length of the light rays. We are supposed to recognize 7 colours.( some say only 6)

This diagram shows how it happens.
When a light ray enters glass or water it bends. As you see it here, blue bends more than red.
This property of light is called refraction.
This happens in a slightly different way by the tiny drops of water. The atmosphere contain droplets of water and we call that clouds, mist or rain.
In addition to refraction droplets cause reflection. This is known as Total internal reflection. The angle by which light deflects or deviates is the angle of deviation.
The usual angle of deviation for blue is 140 while that for red is 138
Fig.2 Total Internal reflection.

Fig.3. Why we see the rainbow curved.
Fig. 4 . Getting a rainbow from a CD.Reflect the sunlight off a CD.