Often, as you watch a fireworks display, you will see a large burst that starts as one color, and then the entire burst changes to a different color. How do they do that?
The body of the firework is filled with carefully arranged, round spheres. The spheres are made by adding layers of a basic firework recipe, with added chemicals that will give a color to the flame. As the outer layer burns away, the next layer starts to burn, changing the color of the flame. The layers have to be exactly the same thickness on all the spheres, so the firework will change color all at once. By making several layers, large fireworks can change colors several times before they burn out.
The recipes for fireworks and colors are very carefully guarded, and each manufacturer has their own secrets. Experts can tell who made a particular firework by the difference in the hue of their blues, greens, and other colors.