Formation of a Rainbow
The formation of rainbow is influenced by dispersal of colours in a white light.
There is a thick film of water droplets that gather in the atmosphere. This acts as a glass medium. When the sunlight or the moonlight passes through, their white light is dispersed showing these different colour combinations.
This can happen after the rain has fallen or during a particular time of climate change.