Black powder is the oldest and most important chemical component of fireworks. This mixture of 15 percent charcoal (carbon), 10 percent sulfur, and 75 percent saltpeter (potassium nitrate) provides the fuel and the explosive force that carries fireworks high into the sky and causes them to burst in all their fiery brilliance. Like many chemical compounds, though, black powder produces only one color, a bright yellow flame, when it burns -- nothing like the rainbow of red, orange, green, blue, and violet displayed each Fourth of July in the United States.
To produce more colorful displays, pyrotechnicians, the people who create fireworks, combine a wide variety of chemical ingredients into a single firework. Because of variations in atomic structure, different atoms give off different wavelengths of light after being heated in a flame. Strontium chloride, for example, burns with a red flame, while barium chloride produces a green flame.
The lifting charge, made of black powder, propels the firework skyward. As it travels higher and higher, a time-delay fuse burns. When the firework reaches its peak, the fuse ignites a charge or charges that blast the firework's "stars" -- individual, jawbreaker-sized pieces made up of these various chemicals -- into the beautiful patterns that audiences have come to expect.
In general, the components of a firework expand evenly when the firework explodes. Therefore, the placement of stars inside a firework determines their arrangement when the firework explodes. For example, a shell loaded with stars made of strontium chloride in the center and barium chloride around the perimeter will produce a flower-like display of red surrounded by green. By varying not just the type of chemical but also the size and configuration of stars used, nearly infinite color and pattern combinations are possible.