Layers of different temperature in the atmosphere creates a distorted image of the sun when it’s near the horizon.
As the sun’s image sinks through these layers it is miraged into fantastical ever changing shapes. Seconds before the sunset, the Green Flash atmospheric phenomena is visible (note the green light on the sun’s upper limb).
Difficult to observe, the momentary green flash above the rising or setting sun has been documented as a phenomenon caused by the atmospheric bending or refraction of sunlight. Like a weak prism, the Earth’s atmosphere breaks white sunlight into colors, bending red colors slightly and green and blue colors through increasingly larger angles.