A page from the "Causes of Color" exhibit...
What causes the colors in flames?
Flame tests are useful because gas excitations produce a signature line emission spectrum for an element. In comparison, incandescence produces a continuous band of light with a peak dependent on the temperature of the hot object.
When the atoms of a gas or vapor are excited, for instance by heating or by applying an electrical field, their electrons are able to move from their ground state to higher energy levels. As they return to their ground state, following clearly defined paths according to quantum probabilities, they emit photons of very specific energy. This energy corresponds to particular wavelengths of light, and so produces particular colors of light. Each element has a "fingerprint" in terms of its line emission spectrum, as illustrated by the examples below.
Because each element has an exactly defined line emission spectrum, scientists are able to identify them by the color of flame they produce. For example, copper produces a blue flame, lithium and strontium a red flame, calcium an orange flame, sodium a yellow flame, and barium a green flame.
Color tells us about the temperature of a candle flame. The inner core of the candle flame is light blue, with a temperature of around 1670 K (1400 °C). That is the hottest part of the flame. The color inside the flame becomes yellow, orange, and finally red. The further you reach from the center of the flame, the lower the temperature will be. The red portion is around 1070 K (800 °C).
The orange, yellow, and red colors in a flame do not relate only to color temperature. Gas excitations also play a major role in flame color. One of the major constituents in a burning flame is soot, which has a complex and diverse composition of carbon compounds. The variety of these compounds creates a practically continuous range of possible quantum states to which electrons can be excited. The color of light emitted depends on the energy emitted by each electron returning to its original state.
Within the flame, regions of particles with similar energy transitions will create a seemingly continuous band of color. For example, the red region of the flame contains a high proportion of particles with a difference in quantum state energies that corresponds to the red range of the visible light spectrum.