Sodium in yellow bursts, strontium in red, calcium gives us orange, barium for green, and copper for blue hues… and there are more where those came from. The science of firework color, as explained above by SkunkBear‘s Adam Cole, is all about chemistry. From Wikipedia:
Colors in fireworks are usually generated by pyrotechnic stars—usually just called stars—which produce intense light when ignited. Stars contain five basic types of ingredients.
• A fuel which allows the star to burn
• An oxidizer—a compound which produces (usually) oxygen to support the combustion of the fuel
• Color-producing chemicals
• A binder which holds the pellet together.
• A chlorine donor which provides chlorine to strengthen the color of the flame. Sometimes the oxidizer can serve this purpose.
See the stars in this cross-section of a 12-inch ball shell at a Maker Faire:Watch this next: Testing Fireworks.