In Pirates of the Caribbean: At World’s End, the crew of the Black Pearl is trapped in Davy Jones’s locker. They need to wait for the green flash of sunset, to flip the ship over and be able to return back to the land of the living. While this is mainly fantasy, it turns out that the green flash of light is a real scientific occurrence.
This rare and interesting optical phenomenon occurs shortly after sunset or just before sunrise. In favorable conditions, the green flash is a result of the combination of two things: a mirage, and a dispersion of light. When the sun is almost entirely below the horizon, but the slimmest portion of the upper edge is still visible, the event will occur. For the briefest of moments, that upper rim of the sun will appear green.
The green flash can only be seen on a clear day, with no clouds or any haze on the horizon. You’d need a distant unobstructed horizon, with a distinct edge. It’s most often seen over the ocean, both by people in boats or on the beach, but it is also possible to see from a high building or mountaintop.
But where does this green come from?
The Earth’s atmosphere acts like a prism and separates the light into different colors. As the sun gets lower and lower in the sky, the light gets refracted more and has further to travel through the thicker atmosphere to reach our eyes, so only colors with the longest wavelength will reach our eyes.
Therefore, as the sun sets it appears red, but in super clear conditions, a small amount of the green wavelength will also reach us, thus coloring the top of the sun and creating a brief green flash before it sets. The reason we don’t see any of the other colors such as violet or blue is because they are scattered by air molecules and pollution.