What process involving trace gases creates the distinct colors seen in emission nebulae?

Answer

Ionization by UV radiation followed by energy release upon electron recombination

Nearby hot stars emit intense UV radiation, which strips electrons from atoms (ionization). As the electrons recombine with the ions, energy is released at specific wavelengths, which we perceive as color.

What process involving trace gases creates the distinct colors seen in emission nebulae?
SpaceastronomycompositionnebulaGases