Chemical Mechanics of Fireworks
The initial stage of a firework is composed of a combustible compound such as gunpowder that is ignited to produce thrust, which sends the firework into the sky a safe distance from onlookers. The second stage is a sealed unit that contains chemicals that will burn when heated. The gases produced by their reactions build up in the sealed container until it can no longer contain the pressure, whereby it explodes. Chemical powders are dispensed in the nearby air and react with oxygen to produce brilliant flames.
Firework Colors and Chemical Elements
One principle of chemical elements is that they give off a unique spectra of colors when burned in an oxygen atmosphere. This principle, often exhibited in flame tests with the results run through a spectrometer, is used to identify unknown elements in a laboratory. It is also highly useful in fireworks because certain elements produce particularly brilliant colors when burned. The colors given off are a function of the arrangement of electrons around the nuclei of an element's atoms
Red, Orange and Yellow Firework Elements
Fireworks that produce orange colors when detonated usually contain the element calcium, which tends to burn orange when reacted in an oxygenated atmosphere. Red fireworks usually contain the element lithium and yellow fireworks have sodium. Because these elements are so reactive they are not found in a pure form in either nature or fireworks, and are included in fireworks in their salt form. This means that they are bonded to another atom from the other end of the periodic table to form a substance that is stable unless energy is applied to them.
Blue, Purple and Green Fireworks
Fireworks that produce the color green are made in a similar fashion to those that produce yellow, orange or red -- they are composed of an alkaline metal, barium, which is bonded in a salt to a halogen-like chlorine. Blue and purple fireworks are somewhat different in that they are produced by combustion of heavier metals in complex with counterions. Blue fireworks are made by burning copper and purple fireworks are produced by burning strontium together with copper.