What is this circle that forms around the Sun?

On some sunny day you must have come across this circle with the colors of the rainbow around the Sun.

 
 

The phenomenon is called Solar Halo and can also be seen around the Moon, in this case called Lunar Halo.

The Halo forms at 17 kilometers altitude by the reflection and refraction of sunlight on ice crystals in the atmosphere and is caused by clouds called Cirrostratus, which form in stable air masses and when humidity is low.

Generally, when there is a Solar Halo and it appears with other more common clouds, it is almost certain that within 1 or 2 days a storm will arrive.

 

The circle forms in an atmospheric layer called the Troposphere and has a colorful appearance because the color of the Sun is white.

The Sun emits light at different frequencies of the electromagnetic spectrum, that is, it produces a mixture of all colors, resulting in white light, but when sunlight is refracted into ice crystals, the colors are divided in a very different way. similar to what happens with a prism, forming the rainbow.

When it happens with the Moon, the process is the same, with the only difference that we cannot see colors in the same way with the Sun, only observing colors of lighter shades.