Sucrose firework–onion laboratory

Experimental principle:
Cane sugar contains three elements: carbon, hydrogen and oxygen, it is flammable. When sulfuric acid drops down with potassium chlorate, which can generate the odd smelly chlorine dioxide gas: 3KClO3+2H2SO4=2KHSO4+KClO4+H2O+2ClO2↑Because the gas has strong oxidizability and can make the sugar burn violently. While adding magnesium powder, it will produce white fireworks. While adding barium nitrate, it will produce green fireworks.