A flame test involves introducing a sample of the element or compound to a hot, non-luminous flame and observing the color of the flame that results.  The compound can be made into a paste with concentrated hydrochloric acid, as metal halides, being volatile, give better results. Different flames can be tried to verify the accuracy of the color. Wooden splints, Nichrome wires, cotton swabs, and melamine foam are suggested for support. Safety precautions are crucial due to the flammability and toxicity of some substances involved. When using a splint, one must be careful to wave the splint through the flame rather than holding it in the flame for extended periods, to avoid setting the splint itself on fire. The use of a cotton swab or melamine foam (used in “eraser” cleaning sponges) as a support has also been suggested.  Sodium is a common component or contaminant in many samples, and its spectrum tends to dominate many flame tests others. The test flame is often viewed through cobalt blue glass to filter out the yellow of sodium and allow for easier viewing of other metal ions.
The color of the flames also generally depends on temperature and oxygen fed; see flame colors. The procedure uses different solvents and flames to view the test flame through a cobalt blue 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. The test is highly subjective.