thumb|right|The flame test carried out on a [[copper halide. The characteristic bluish-green color of the flame is due to the copper.]]
A flame test is a relatively quick test for the presence of some elements in a sample. The technique is archaic and of questionable reliability, but once was a component of qualitative inorganic analysis. The phenomenon is related to pyrotechnics and atomic emission spectroscopy. The color of the flames is understood through the principles of atomic electron transition and photoemission, where varying elements require distinct energy levels (photons) for electron transitions.
History
Robert Bunsen invented the now-famous Bunsen burner in 1855, which was useful in flame tests due to its non-luminous flame that did not disrupt the colors emitted by the test materials. Safety precautions are crucial due to the flammability and toxicity of some substances involved. Sodium is a common component or contaminant in many samples, and its spectrum tends to dominate many flame tests others. The procedure uses different solvents and flames to view the test flame through a cobalt blue glass or didymium glass to filter the interfering light of contaminants such as sodium.
Flame tests are subject of a number of limitations. The range of elements positively detectable under standard conditions is small. Some elements emit weakly and others (Na) very strongly. Gold, silver, platinum, palladium, and a number of other elements do not produce a characteristic flame color, although some may produce sparks (as do metallic titanium and iron); salts of beryllium and gold reportedly deposit pure metal on cooling.
Common elements
thumb|right|Coloured flames of methanol solutions of different compounds, burning on cotton wool. From left to right: [[lithium chloride, strontium chloride, calcium chloride, sodium chloride, barium chloride, trimethyl borate, copper chloride, cesium chloride and potassium chloride.]]
Some common elements and their corresponding colors are:
{| class="wikitable"
!Symbol
!Name
!Color
