We soaked the splints in aqueous salt solutions and put them into flames. The cations were lithium, potassium and sodium. The colours are produced because the thermal energy moves electrons up through the energy levels. As the electrons lose energy and de-excite, they emit photons of visible light. The frequency (and hence the colour) of that light is proportional to the energy lost in the de-excitation. This experiment shows that the electron energy levels are arranged differently in each element.