-
At point of ignition.
Depending in the length of a wick it make take a few seconds for a flame to reach the bottom of a firework. The bottom of the firework is where most of the gunpowder and chemicals are stored that cause the explosion. -
The flame reaches the bottom.
Once the flame reaches the bottom of the firework, it cause a chemical reaction with the gunpowder causing it to shoot off into the sky. -
Once in the sky
After the firework travels a few hundred feet in the air it will explode from the pressure built up in the canister. The different chemicals cause colors like barium chloride, is bright green.
Blue is copper compounds and chlorine producer.