Halos result from sunlight (or moonlight) being bent by randomly distributed hexagonal ice crystals in the atmosphere. Because of different chromatic refraction the halo shows colors: The minimum deflection of the light is depending upon the wavelength, the red light beeing refracted less than the blue light.
In the picture above you can see a 22 degree sun-halo as well as two sundogs (or mock suns or parhelia) left and right of the sun. These parhelia are visible only if there are hexagonal ice crystals with a preferred vertical orientation of their axis of symmetry. The angular distance of the parhelia is depending on the elevation of the sun. Near sunset they lie within the 22 degree halo.
On the bottom of the picture there is a third peak of luminosity in the halo. It might be part of the lower tangent arc.