How Fireworks Work, It’s All In The Chemistry
Professor John A. Conkling wrote a textbook called the Chemistry Of Pyrotechnics: Basic Principles And Theory (we’ll wait here for a moment while you go buy that online), and he posted a video discussing and demonstrating how it all works.
In a nutshell, you need at least one chemical that’s oxygen-rich (an oxidizer), and you need fuel (such as sulfur, charcoal, or magnesium powder) to combine with that to make heat.
Aerial shells, those iconic fireworks that populate the night sky on special occasions, are designed with black powder on the bottom that acts as a propellant, a fuse that burns from the bottom to the center of the cardboard casing, where there’s another sphere of black powder that propels fun, colorful balls outward, creating various lighting effects.
The title says it all
You launch aerial shells by sticking them in a mortar tube, lighting the fuse, and hitting a button to send that sucker high into the sky.
The colors and effects you see are the result of chemical reactions that rid themselves of their energy by producing specific wavelengths of light.
Do yourself a favor: Even if you’re not all that interested in the chemistry behind fireworks, skip to about 4:20 in the video posted above and watch Conkling demo fireworks in a lab. Happy Independence Day!