A green flash is a brief flash of green light seen at the very top edge of the sun as it sets or rises. The atmosphere refracts sunlight near the horizon, and because it bends shorter wavelengths slightly more than longer ones, the sun's coloured images are stacked — the red sets first, then yellow, green and finally blue, leaving a thin green rim on top. A density gradient near the horizon creates a mirage that magnifies that otherwise tiny green rim into a visible flash.
Worth knowing
The flash is green rather than blue or violet because of atmospheric extinction: along the long, grazing path through air near the horizon, the shortest wavelengths are scattered away almost entirely, so green survives as the last colour you actually see.
Note
Still unsure it's the same cloud? Our app, Cloud Point— on iOS and Android — reads a photo and returns the likely type with altitude, useful when a formation is fading faster than you can look it up.