Flame test for strontium. The color of the flame is caused by electrons that have been excited to a higher energy state. When they relax they emit energy in the form of a characteristic wavelength of light. The color of the flame is different for different elements and can be used to identify unknown substances.