Lightning is a fascinating phenomenon due to discharges with in the clouds of thunderstorms. As areas of positive and negative electromagnetic fields separate and build we see quick discharges of energy as lightning. Pecos Hank on YouTube has an excellent video going into further depth as to how lightning forms.
For a quick overview here’s the general gist.
Ok so now we know how lightning forms lets talk about how lightning get it’s color! To better explain this we need to quickly understand how light works inside of gases. So if you’re familiar with the prism below this is the beginning to what is known as spectroscopy. This is the study of absorption and emission of light which is done by splitting the light through a prism.
Light gets split into its array of rainbow colors because of the speeds at which the wavelengths of light move at. We won’t get into the physics of light here but the TLDR essentially is Blue/Violet light travels faster than Red light, so Blue/Violet bends less than the slower moving red light.
We can apply the same idea to light emitted from ionizing gas. We can do this by hitting the gas atoms or molecules with energy or electrons which excites or ionizes the element and puts it into a higher energy state. The calm down to equilibrium gives off a photon in specific wavelengths. This allows scientists and especially astronomers to see what elements stars and planets are made up of!
Below is an example of a few gasses’ absorption lines. The dark lines we see are the absorption lines that particular elements absorb within the visible spectrum.
By removing background light we can instead see the emission lines given off from particular elements, we see the absorption lines when the background is illuminated like we saw above.
Below is the same chart as above but in the emission spectrum.
So with that of the way lets focus on what elements are present here on Earth! Our atmosphere is comprised of 78% Nitrogen and 21% Oxygen and 3% Argon, so for simplicity sake lets just focus on Nitrogen and Oxygen.
So when highly charged electrons zip through the gas in our atmosphere (Lightning) it excites the molecules in the atmosphere by ionizing it. This then makes them quickly release photons (visible light) and because we are mainly Nitrogen and Oxygen at the surface we see a combination of violets, blues, and reds. If you recall to elementary art class, when we mix blue and red we get violet!
Thus we arrive at the given color of lightning!
This is actually the same process that affects the northern lights and auroras! We see them as the neon green and pockets of red, this is because very high in the atmosphere its mainly just oxygen. Keep in mind pressure is much less at the altitudes auroras occur (around 60 to 600 miles above the earth) Oxygen’s emission lines move to the more blues, greens, and yellows.