Flame test is a qualitative test used to identify substances in a mixture. in this method, the unknown substance or mixture is subjected to a flame (flame of a Bunsen burner or a spirit lamp) with the help of a thin wire. The color of the flame is noted. This test is sensitive for identification of metals. It can distinguish similar colors too, so accurate identification of unknown substance can be done. Impure substances can also be identified by this method.
While identifying the metal ions by this method impurities might hinder the test, but the mixture is dipped in hydrochloric acid and then subjected to the flame. Another difficulty would be with metal ions having similar colors of flame.