The colors in fireworks used on the Fourth of July and at other times are produced predominantly by metal salts, including strontium and lithium (red), copper (blue), and barium (green). But fireworks may also contain organic compounds that color the smoke that they produce.
Among these is solvent blue 36, aka oil blue A, blue AP, and other names. It is an anthraquinone dye that is also used in polystyrene and acrylic resins and in liquids such as oils and inks. It gives smoke a bluish-violet color. Its cousin solvent blue 35 has n-butyl instead of isopropyl groups and is also used to color smoke.
So this Fourth, when you see blue smoke coming from fireworks, think of the solvent blues!
Learn more about this molecule from CAS, the most authoritative and comprehensive source for chemical information.