The hottest flames dancing amid the logs of a campfire appear white with red representing the coolest flickers. The play of colors in the flames represent the different 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 also allow astronomers to determine the temperatures and compositions of faraway stars.
TL;DR (Too Long; Didn't Read)
Even though red typically represents hot or danger, in a fire, it depicts cooler temperatures. Blue, on the other hand, while representing cooler colors in society, actually epitomizes the opposite in fires as some of the hottest flames all around. When all flame colors combine, they produce white, the hottest color of them all.
Fire Combustion Colors
On Earth, most fires are the result of combustion -- a chemical reaction between a fuel and a compound of oxygen -- in most cases, molecular oxygen. As an exothermic reaction, the fire releases heat, but when combustion speeds up, flames begin dancing atop and within the burning substance with the flame’s colors depend 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 accounts for the flame’s heat.
Fire Temperatures and Colors
Temperatures rise gradually during combustion, and flames occur only when the temperature reaches the point for the fuel to vaporize and combine with oxygen. Temperatures about 932 degrees Fahrenheit produce a red glow, and temperatures between 1,112 and 1,832 degrees F produce red flames. The flames turn orange between 1,832 and 2,192 degrees F and turn yellow between 2,192 and 2,552 degrees F. At hotter temperatures, the flame color moves into the blue-violet end of the visible spectrum.
Color and Chemical Reactions
While flame color depends on temperature, it also depends 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, 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. 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 lay 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.