Metal salts emit different colors when they are heated. The metal's electrons move from the ground state to an excited state; when the electrons relax to the ground state, they give off energy which is perceived as light of a particular color.