A rainbow is a meteorological phenomenon that occurs when sunlight is reflected, refracted, and dispersed by water droplets in the atmosphere. It appears as a multicolored arc in the sky, typically seen opposite the sun when the sunlight shines onto raindrops or other water particles, such as mist or spray. Rainbows are formed due to the refraction and dispersion of sunlight, splitting it into its constituent colors – red, orange, yellow, green, blue, indigo, and violet. Each color corresponds to a different wavelength of light.
The primary cause of a rainbow is the refraction and dispersion of sunlight by water droplets in the atmosphere. When sunlight encounters these water droplets, it bends (refracts) as it enters the droplet, and then it reflects off the back surface of the droplet. Upon exiting the droplet, the light is refracted again as it moves back into the air.
This process causes the sunlight to separate into its component colors (dispersion), forming the familiar spectrum of colors seen in a rainbow. Each color corresponds to a different wavelength of light, with red having the longest wavelength and violet having the shortest.
The specific angle at which the light is refracted and reflected within the droplets determines the size and shape of the rainbow. Rainbows typically appear as arcs, with the center of the arc opposite the sun in the sky.