Three light sources and the spectra of visible light they emit viewed through a diffraction grating (on display in the Physics Lecture Hall display case). Left below is a continuous spectrum from the hot filament of an incandescent light. This spectrum is a so called continuous "black body" spectrum emitted by a dense object and is determined only by the temperature of the object. Note the (ROY G BIV = red, orange, yellow, green, blue, indigo, violet) distribution of spectral colors, with the R end being the long wavelength, low energy end of the spectrum. Center below is atomic line spectrum from a mercury fluorescent light. The dilute gas atoms in the tube are excited by electrical discharge and emit light with specific energies (wavelengths) corresponding to the energy differences between discrete allowed energies for electrons in the mercury atom. The electron energies are quantized in discrete steps so only discrete energies (wavelengths or colors) of light can be emitted. Right below is atomic line spectrum from a hydrogen fluorescent light. Note the red emission line that gives the red color to the Orion Nebula pictured below.
The Orion constellation presents a nice example in the sky of differing light spectra. The photograph shown is overexposed to accentuate the colors. The prominent star in the upper left corner is the red giant Betelgeuse, which is clearly reddish in the night sky. Betelbeuse emits black body radiation peaked in the red by virtue of its "coolish" 3,000K (2700 C) surface temperature. Rigel (bottom right), on the other hand, is a hot blue star with a surface temperature near 20,000 K. Our sun is a yellowish star because its surface temperature is about 6000 K. The Orion Nebula (a glowing hydrogen cloud) is the reddish cloud in the "sword" of Orion which hangs below the three "belt" stars. The Orion Nebula glows red because of a famous red atomic hydrogen emission line present only when a cloud of hydrogen is hot enough.