What makes fireworks burst with vibrant colors?

Skies across the United States will be lit up by splashes of colors followed by thunderous booms on July Fourth as people coast to coast celebrate Independence Day.

Every firework display is unique, but they all have one thing in common: science.

The New York City skyline is seen in the distance as fireworks explode over the Hudson River during the Macy's fireworks display July 4, 2009 in Weehawken, New Jersey. (Photo by Yana Paskova/Getty Images)

Inside every firework is a specific combination of metals and salts that determines what colors will appear in the sky when the firework explodes. Strontium radiates hues of red, barium glistens in shades of green, and copper dazzles onlookers with vibrant blues.

Other compounds are added to these metals and salts to help the colors pop even more to create awe-inspiring displays.

Chlorine can cause some colors to shine brighter, potassium nitrate and sulfur help fireworks burn, and chlorates and nitrates provide oxygen for the colorful explosion, according to EarthSky.

Similar science is also at work during meteor showers, as the chemical composition of the space rocks can cause shooting stars to glow in various colors as they burn up in Earth's atmosphere.