Observation is the first step of a new inventor

Have you ever seen a rainbow?

A rainbow is a multicolored arc , or curved line , in the sky. Most rainbows form when the sun's rays strikes raindrops falling from faraway rain clouds. Rainbow appears in the part of the sky opposite the sun, usually in the early morning or later afternoon. From inside to outside, the colors of a rainbow of a rainbow are Violet , Indigo , Blue , Green , yellow , Orange and Red.  
Sun light travels through space in  the form of waves. Scientist use an idea called wavelength to describe these waves. Some light have long wave lengths, while others have short wave lengths. Light waves with different wave lengths appear as different colors.Usually all light waves blends together to form white light.

Then how a rainbow is formed?

When the light enters to the surface of the rainbow it refracts and then reflects off the back of the drop and again refracts as it leaves the drop.
When light waves pass through raindrops, they separate. This happens because the raindrops blends the light waves with different wave lengths by a different by a different amount. The separated light waves appear as the colors of a rainbow.
The brightest and most common type of rainbow is called a 'primary rainbow'. Some times a fainter rainbow forms outside the primary bow. This is called as secondary bow. A secondary bow forms when the light blends twice inside the water drops. The first bend makes the primary bow, and the second bend makes the secondary bow . The colors in the secondary bow appear in the opposite order of the colors in the primary bow.

Have you ever seen difference between a rainbow in sea and a rainbow the land?

Seawater has a higher refractive index than rain water , so the radius of a rainbow in sea spray smaller than a true rainbow

 .Seawater has a higher refractive index than rain water, so the radius of a "rainbow" in sea spray is smaller than a true rainbow. This is visible to the naked eye by a misalignment of these bows.The amount by which light is refracted depends upon its wavelength, and hence its colour. Blue light (shorter wavelength) is refracted at a greater angle than red light, but due to the reflection of light rays from the back of the droplet, the blue light emerges from the droplet at a smaller angle to the original incident white light ray than the red light. You may then think it is strange that the pattern of colours in a rainbow has red on the outside of the arc and blue on the inside. However, when we examine this issue more closely, we realise that if the red light from one droplet is seen by an observer, then the blue light from that droplet will not be seen because it is on a different path from the red light: a path which is not incident with the observer's eyes. The blue light seen in this rainbow will therefore come from a different droplet, which must be below that whose red light can be observed.

Contrary to popular belief, the light at the back of the raindrop does not undergo total internal reflection, and some light does emerge from the back. However, light coming out the back of the raindrop does not create a rainbow between the observer and the Sun because spectra emitted from the back of the raindrop do not have a maximum of intensity, as the other visible rainbows do, and thus the colours blend together rather than forming a rainbow.[3]
Picture
Picture