One of the magical experiences growing up, with my mom working in a food safety lab, was playing with the different coloured fires (and the pipettes of course).
I only later learned about spectrometry: roughly, the flame's light is split into a rainbow with a diffraction grating and the colours become a barcode for the chemicals that burn.