Absorption spectroscopy
The missing colours give us information about the energy of the photons that cause excitation. Note that the energy gained by the excited electron is equal to the energy of the incident photon (a particle of light), so only photons with fitting energies will cause an excitation. The energy of a photon is proportional to its frequency: