Scientists often classify spectra based on the key light–matter interactions they represent and how they are used.
Continuous Spectrum: A continuous spectrum contains all wavelengths of light in a certain range. Hot, dense light sources like stars, for example, emit a nearly continuous spectrum of light, which travels out in all directions and interacts with other materials in space. The broad range of colors that a star emits depends on its temperature.
Absorption Spectrum: When starlight passes through a cloud of gas, some of the light is absorbed and some is transmitted through the gas. TThe wavelengths of light that are absorbed depends on what elements and compounds it is made of. An absorption spectrum has dark lines or gaps in the spectrum corresponding to wavelengths that are absorbed by the gas.
Emission Spectrum: Starlight can also heat up a cloud of gas, exciting the atoms and molecules within the gas, and causing it to emit light. The spectrum of light that a cloud of gas emits depends on its temperature, density, and composition. An emission spectrum consists of a series of colored lines that correspond to wavelengths emitted by the glowing gas.
Credits
Illustration
NASA, ESA, Leah Hustak (STScI)