A continuous spectrum contains every wavelength of light across an unbroken range, producing a smooth rainbow of color. A line spectrum contains only specific, isolated wavelengths, appearing as distinct bright or dark lines against an otherwise empty (or full) background. The difference comes down to how the light is produced: heated dense matter emits a continuous spread of energy, while individual atoms emit or absorb light only at precise wavelengths determined by their internal structure.
How a Continuous Spectrum Forms
Any object that is hot and dense enough will glow across a broad, unbroken range of wavelengths. Physicists call this blackbody radiation. The filament inside an incandescent lightbulb is a familiar example: electricity heats the wire until it glows, and it emits light at every visible wavelength (plus a lot of infrared). The result, spread through a prism, is a smooth gradient from red through violet with no gaps.
The shape of that gradient depends entirely on temperature. As an object gets hotter, two things happen: it emits more total energy, and the peak of its spectrum shifts toward shorter wavelengths. A cooler object peaks in the red or infrared. A hotter object peaks in blue or even ultraviolet. This relationship, known as Wien’s displacement law, lets scientists measure the temperature of stars and other glowing objects just by finding where their spectrum peaks. The key point is that there are no gaps or missing colors. Every wavelength in the range is represented.
How a Line Spectrum Forms
A line spectrum looks completely different. Instead of a smooth rainbow, you see individual slivers of color at specific positions, with darkness in between. This happens because atoms can only hold specific amounts of energy. Their electrons sit at fixed energy levels, almost like rungs on a ladder. When an electron jumps from a higher rung to a lower one, it releases a photon with a wavelength that corresponds exactly to the energy gap between those two rungs. No other wavelengths are possible for that particular jump.
Hydrogen, the simplest atom, illustrates this clearly. Its visible emission lines, called the Balmer series, appear at just four wavelengths: 656 nm (red), 486 nm (blue-green), 434 nm (blue), and 410 nm (violet). Each line corresponds to an electron falling from a higher energy level down to the second level. The red line comes from a drop of one level (third to second), the blue-green from two levels up (fourth to second), and so on. If hydrogen’s electrons could have any energy at all rather than fixed amounts, it would emit a continuous spectrum instead. The fact that only these four colors appear in visible light is direct evidence that energy inside atoms is quantized.
Emission Lines vs. Absorption Lines
Line spectra come in two varieties. An emission spectrum shows bright colored lines on a dark background. You see this when a gas is heated or energized (by electricity, for instance) and its atoms release photons as excited electrons drop back down to lower energy levels.
An absorption spectrum is essentially the inverse. Start with a source that produces a continuous spectrum, like a star, and pass that light through a cooler gas. The atoms in the gas absorb photons at exactly the same wavelengths they would emit. The result is a continuous rainbow with narrow dark lines cut into it at those specific positions. Hydrogen’s absorption lines appear at the same four visible wavelengths as its emission lines: 410, 434, 486, and 656 nm. The bright lines become dark lines, but the positions are identical.
Why Each Element Has a Unique Pattern
Every element has a different arrangement of electron energy levels, which means every element produces a unique set of spectral lines. The National Institute of Standards and Technology describes these patterns as “spectral fingerprints,” comparable to human fingerprints in their ability to identify a substance. By measuring which wavelengths are present or missing in a sample of light, scientists can determine exactly which elements are there and in what quantities.
This is the foundation of spectroscopy, one of the most widely used tools in chemistry, physics, and astronomy. A forensic chemist can identify trace elements in a sample. An environmental scientist can detect pollutants in a water source. The technique works because no two elements share the same fingerprint.
How Astronomers Use Both Spectra Together
Stars provide a perfect real-world case where both types of spectra appear simultaneously. The dense, hot interior of a star produces a continuous spectrum. But as that light passes outward through the star’s cooler outer atmosphere, atoms there absorb specific wavelengths, carving dark lines into the rainbow. These are called Fraunhofer lines, first cataloged in the sun’s spectrum in the early 1800s. They reveal which elements are present in the star’s atmosphere.
Astronomers have built an entire classification system around these absorption patterns. Stars are sorted into seven main categories (O, B, A, F, G, K, M), each subdivided into ten subclasses. The hottest stars, types O and B, show relatively few spectral lines because their extreme temperatures strip atoms down to simple states. Cooler stars, types K and M, display a dense forest of lines because lower temperatures allow more complex atomic structures to survive. Although the system is based on spectral lines, it effectively sorts stars by surface temperature.
The continuous part of the spectrum tells astronomers the star’s temperature (via the peak wavelength), while the line pattern tells them the star’s chemical composition. Together, the two types of spectra give a remarkably complete picture of a distant object that no one can physically visit or sample.
Everyday Examples
You encounter both types of spectra in ordinary life, even if you don’t realize it. An incandescent lightbulb produces a nearly perfect continuous spectrum because its glowing filament behaves like a blackbody radiator. A neon sign, by contrast, produces a line spectrum: the gas inside the tube is energized by electricity, and the atoms emit light only at their characteristic wavelengths, giving neon its distinctive red-orange glow. Different gases produce different colors, which is why “neon” signs can appear in many hues.
White LEDs are an interesting middle case. A single-color LED emits a narrow peak of light, closer to a line spectrum. But a white LED works by coating a blue LED with a phosphor that converts some of the blue light into yellow. The combination of leftover blue and broad yellow produces a spectrum that looks roughly continuous to the eye, though it has a noticeable spike in the blue range. It mimics a continuous spectrum well enough to appear white, but under a spectrometer it looks very different from an incandescent bulb’s smooth curve.
The Core Distinction
The difference ultimately traces back to one physical principle. Dense, hot matter contains so many interacting particles that energy transitions blur together into a smooth continuum, producing every wavelength at once. Isolated atoms, with their fixed and well-separated energy levels, can only emit or absorb light at specific wavelengths. A continuous spectrum is the signature of bulk heated matter. A line spectrum is the signature of individual atoms or ions, and it encodes the identity of whatever element produced it.

