Once the electrons return to their original orbital, a photon is released containing the energy of excitation, or the energy between orbitals. The energy of the photon determines its wavelength, and thus, the color it produces. Different gases have different jumps in energy between orbitals, so they produce photons of different energy, and thus, different colors of light.