If you live in the United States, you will likely take in an evening of fireworks. While you are enjoying them safely, you’ll notice that fireworks come in a variety of colors. The different colors are due to various metallic salts that are used in the fireworks. For example, reds can be created with strontium or lithium salts, orange with calcium, green with barium, blue with copper, and so on. A wide variety of colors can be produced by mixing these compounds as well.
The reason these salts give color to fireworks is because of their emission spectra. When these metallic compounds are superheated they emit light. Because of their molecular structure, they only emit light at particular wavelengths (colors). Particular compounds are chosen because the wavelengths they emit are in a particular color range. If the brightest wavelengths are green, then the firework will look green, for example.
The emission spectra of each atomic and molecular compound has a unique pattern. It is like a fingerprint that uniquely identifies the type of material. So as you watch the evening fireworks you can identify the type of salt compounds by their color. See a blue firework and it is likely copper. See a red one and it is likely strontium.
With the naked eye you can only identify broad types of compounds, and since some colors have multiple possibilities you can’t be exactly sure which type is used. However if you were to analyze the emission spectra of the fireworks, then you could identify the exact compounds being used. This is a bit tricky to do precisely, but if you have a pair of “fireworks glasses” or “rainbow glasses” to watch the fireworks, then you can observe some of the spectra. You can also check out some emission spectra here.
So what does this have to do with astronomy? When you identify compounds by the color of fireworks, you are using the same technique astronomers use to identify elements in distant stars. The unique fingerprint of emission spectra is the same everywhere in the universe, so when astronomers measure a spectra in a distant star they know what particular elements and molecules exist in that star.
So if you watch fireworks under a starry sky tonight, try your hand at identifying compounds. And take a moment to ponder their connection to the stars.