Rainbows are formed when a solar eclipse happens.
Rainbows are formed when the sunlight hits the raindrops. Raindrops spilt the sunlight into 7 colours of the rainbow. That is how a rainbow is formed.
When the Moon comes in between the Sun and the Earth in a straight line, then a solar eclipse is formed. This formation of a solar eclipse is based on the concept of: