Rainbows occur when light is reflected, refracted and dispersed in airborne water droplets, which results in the light being split into a visible spectrum.
They are most commonly seen after rain, so the appearance of a bright and colorful rainbow after bad weather is often associated with the idea of joyous feelings after a gloomy period and the sense that something good will always follow the dark times.
After they form, rainbows only last a short time, and this ephemeral quality coupled with the sense of wonder and mystery they inspire have always been associated with magic and the spirit world.
Rainbows are also a source of wonderment for children, and children love to draw or paint them, so as adults, when we see a rainbow, it reminds us of the innocent, carefree days of our childhood.
Until relatively recently, people wouldn’t have known how rainbows were formed, so the wonderous arc of bright colors in the light would have seemed magical or even divine.