Step-by-step explanation:
How Fireworks operate
Fireworks contain an explosive powder, along with a binding paste, mixed with the signature chemicals responsible for its bright colors. ... The wavelength, and so the color of the light emitted, is fixed by these energy differences, giving each substance a "fingerprint" line emission spectrum. When the fireworks explode, electrons within the atoms of these different elements absorb energy and get “excited” which causes them to move into the higher energy orbits. When they come down to lower energy orbits, photons are released which allow us to see the great colors during a fireworks show. The electrons of the aluminum atoms absorb heat energy and become excited. The excited energy level the of electrons are energy level 2 or n=2 and above. ... Then electrons of lose the energy and fall back down to ground state which at energy level .This is also how a firework works on an atomic level.
Hope it helps :)