Oxygen at higher altitudes has a different emission frequency apparently (I've only ever seen the faintest green pulsing aurora IRL)
It's possible to tell what elements something is made of by determining the spectra coming off of it when it's excited: https://en.wikipedia.org/wiki/Atomic_spectroscopy