Basic gunpowder, or ‘black powder’, has been more or less the same since its invention in China. Such was the ingenuity of Chinese and Japanese fireworks that they have sometimes been described as ‘fantasques’. Black powder is also the same as that mixed by the 13th century scientist, Roger Bacon, namely: ‘saltpeter’ or potassium nitrate (75%), charcoal (15%), and sulphur (10%). That is, there has to be an Oxidiser and Fuel or reducing agent so that when heat is applied an electron-transfer or oxidation-reduction reaction takes place. As to the colours:
WHITE – For white fire the fuel needs to be a reactive metal such as magnesium to produce an incandescent white hot glow. A mixture of potassium chlorate and fine aluminium or magnesium powder produces a big explosive photoflash.
GOLD – Gold coloured sparks are produced by charcoal and iron fillings at a lesser temperature (1500 ºc).
YELLOW – Yellow orange light of a wavelength of 589 nan is emitted by sodium heated above 1800 ºc.
RED – Red is emitted by strontium hydroxide (SrOH) and strontium chloride (SrCl) at wavelengths between 605 and 682 nan. Aluminium granules added create red sparklers.
GREEN – Greens are created by the bariums, barium chloride (BaCl) gives green light between 507 and 532 nan. This is so unstable that it has to have special packing.
BLUE – A rich blue is emitted by copper chloride (CuCl) but there needs to be precise control over proportion and particle size.
PURPLE or VIOLET – Comes from strontium chloride and copper chloride which also needs careful control.