Flame Test of Alkali Metals and Alkaline Earth Metals
Yes, the metals, when sent in a flame produce the same colors as their salts. In fact, the metallic ions do not produce any color when sent in a flame. It is only the neutral atom that produce the famous yellow double line of the sodium. This means that a tiny amount of the $\ce{Na+}$ and $\ce{Cl-}$ ions are first transformed into neutral $\ce{Na}$ and $\ce{Cl}$ atoms. And the color of the flame is due to the deexcitation of these rare atoms being first electronically excited in the flame. So it means that the following processes are occurring successively in the flame:$$\ce{NaCl(s) -&gt; Na(g) + Cl(g)}$$ $$\ce{Na + heat -&gt; Na^*}$$ $$\ce{Na^* -&gt; Na + h\nu }$$ The famous yellow light of the $\ce{Na}$ atom is due to the return of the outer electron from the level $4s$ to $3p$ of the sodium atom, if my memory is good. Nothing to do with the $\ce{Na+}$ ion.