Fox News Weather Center

The science behind fireworks: 'Chemistry in action'

Every Independence Day, millions of Americans gather to experience the loud cracks, booms and incandescent bursts of celebratory fireworks displays.

The mechanics of our patriotic pyrotechnics come entirely from chemistry, the driving force behind the motion, heat, light, smoke and sound of these brilliant, captivating displays.

"Everything you see in a fireworks display is chemistry in action," Washington College adjunct chemistry professor John Conkling explained in an educational video.

While the chemistry of fireworks has evolved over time, the earliest use of chemical compounds to produce a fiery reaction dates back thousands of years.

NYC fireworks

Macy's fireworks displays as seen from New Jersey. (Photo/Getty Images)

Early pyrotechnics are thought to have originated in China and India, according to Chemistry of Pyrotechnics: Basic Principles and Theory, a book penned by Conkling.

One of the main ingredients in early pyrotechnics was saltpeter, or potassium-nitrate, which was mixed with sulfur and other organic fuels for incendiary military applications. By mixing potassium-nitrate with sulfur and charcoal, black powder was created.

Black powder, or gunpowder, is considered the first modern high-energy composition, according to Conkling's book. The sulfur and charcoal act as the fuel, while the potassium-nitrate acts as an oxidizer, which is crucial for the creation of fireworks.

An oxidizing agent, a fuel, metal compounds for color and a binder are needed to create a proper firework, according to the American Chemical Society.

Metal oxides and metal salts are used to produce the vivid colors of modern firework displays. The binder holds the oxidizing agent, fuel and colorants together. All of these chemicals are packed into a cardboard aerial shell which houses a black powder mixture at the bottom.

In order to propel the shell high into the air, a lifting charge of black powder is used with a tube, or mortar.

After the lifting charge sends the shell skyward, a secondary timing fuse ignites the black powder mixture at the bottom, leading to an intense chemical reaction in the form of gas and heat.

This violent, explosive expansion releases the ignited effects pellets, or stars, inside to produce the fiery display overhead.

The secondary fuse is used to time the explosion of the shell and keep onlookers safe from harm by ensuring it releases at a safe height.

"The loud boom that accompanies fireworks is actually a sonic boom produced by the expansion of the gases at a rate faster than the speed of sound," according to the American Chemical Society.

When it comes to the unique shape and behavior of a firework, it is all dependent on the calculated arrangement of effect pellets. Different arrangements can be used to create shapes such as willows or spinners.

Perhaps the most exciting part of a firework display comes from their wide range of colors, which are all dependent on what types of metals are used, according to Conkling.

"When fireworks explode in the sky, the gunpowder reactions create a lot of heat, causing the metallic substances present in the stars to absorb energy from the heat and emit light," according to the American Chemical Society.

"These metallic substances are actually metal salts, which produce luminescent light of different colors when they are dispersed in the air. This light is produced by electrons inside the metal atoms."

Red fireworks are the result of strontium salts or lithium salts such as lithium carbonate or strontium carbonate. Calcium chloride and sodium are used to produce orange and yellow light. For the vivid green displays, barium compounds are used.

The hardest color to produce pyrotechnically is blue, according to Conkling, which relies on copper compounds such as copper chloride. Purple can be achieved by mixing strontium compounds for the red light and copper compounds for the blue.

"Color mixing is advancing. We can usually make a pretty deep red, a nice green, a reasonable blue. Now, if you start to combine the red and the blue, you get violet, lilac, purple," Conkling said in an interview with PBS NOVA.