Whether they are dancing around the logs of a campfire or rising steadily from the wicks of candles, flames display a variety of colors. The light show is partly due to the diversity of substances that undergo combustion in a typical fire, but it's also true that hotter fires burn with more energy and different colors than cooler ones. These two universal facts allow astronomers to determine the temperatures and compositions of faraway stars.
The Colors of Combustion
On Earth, most fires are the result of combustion, which is a chemical reaction between a fuel and a compound of oxygen -- in most cases, the compound is molecular oxygen. The reaction is exothermic, which means it releases heat. When combustion is fast enough, flames are produced, and the color of the flames depends on the amount of heat being released -- hot flames are white, and cool ones are red. As things heat up and combustion becomes more complete, flames turn from red to orange, yellow and blue. Flames often appear white when emitting a variety of colors at the same time, which means they are hot.
The Temperatures of Fire
Temperatures rise gradually during combustion, and flames occur only when the temperature is high enough for the fuel to vaporize and combine with oxygen. Temperatures in the neighborhood of 500 degrees Celsius (932 degrees Fahrenheit) produce a red glow, and temperatures between 600 and 1,000 degrees Celsius (1,112 and 1,832 degrees Fahrenheit) produce red flames. The flames turn orange between 1,000 and 1,200 degrees Celsius (1,832 and 2,192 degrees Fahrenheit), and they turn yellow between 1,200 and 1,400 degrees Celsius (2,192 and 2,552 degrees Fahrenheit). At hotter temperatures, the flame color moves into the blue/violet end of the visible spectrum.
Colors of Chemical Reactions
Flame color isn't only dependent on temperature but also on the chemical composition of the fuel. As the temperature becomes hot enough for different chemicals present in the fuel to react with oxygen, characteristic colors appear based on the amount of energy released during the oxidizing reactions. For example, barium produces a green-colored flame, which you have probably seen in fireworks. Carbon and hydrogen produce blue and violet flames when they oxidize completely-- they are responsible for the blue color around the base of a gas burner or candle flame.
The Colors of Stars
Astronomers can gauge a star's temperature by observing its color because all objects in the universe emit a form of electromagnetic radiation called black body radiation, and the energy of this radiation -- and its wavelength -- changes with temperature. Objects that emit violet or ultraviolet light are hotter than those that emit red or infrared light. Between these extremes are orange, yellow and blue. Stars also emit green light, but people would only be able to see it if it were the only color being emitted, which never happens. Each star also has a unique spectrum that supplies more information about its temperature and the elements inside its atmosphere.