... like I'm 5 years old
Fireworks are a spectacular sight, lighting up the night sky with a burst of colors. But have you ever wondered how exactly these colors are produced? At the simplest level, fireworks create colors by burning chemicals. Each color is produced by a different chemical. For example, red is created by strontium, green by barium, and blue by copper. When these chemicals burn, they produce light of a specific color. This is similar to how a light bulb works. When electricity passes through the bulb, it heats up a tiny wire inside it, causing it to glow and produce light.
Imagine you are an artist with a palette of paints. Each paint tube represents a different chemical. When you squeeze out a tube and spread the paint on a canvas, it creates a specific color. That's exactly what happens in a fireworks display. The firework is like a giant canvas in the sky, and the chemicals are the paints.
... like I'm in College
Fireworks' colors come from a concept in chemistry known as atomic emission. Every element on the periodic table can absorb energy, get excited, and emit energy in the form of light. The color of this light depends on the amount of energy absorbed and released, which is unique to each element. The chemicals in fireworks are carefully chosen mixtures of fuel and an oxidizer. The fuel, most commonly aluminum or magnesium, burns to release energy, exciting the atoms of the color-producing chemical. When these atoms return to their normal state, they release energy as light of a specific color.
To understand how fireworks produce colors using a Lego analogy, imagine each Lego block is an atom of a specific chemical. Now, when energy is provided (for example, by pushing a Lego construction from a height), the blocks (atoms) get excited and break apart. However, they quickly reassemble (return to the ground state), and in the process, they release energy. This release of energy is similar to the sound you hear when the blocks hit the ground, but in fireworks, it's a burst of light. The color of the light depends on the type of Lego block (chemical) used. Just as different blocks produce different sounds when they hit the ground, different chemicals produce different colors when they return to their ground state.
... like I'm an expert
At an expert level, the color production in fireworks is explained by Quantum Mechanics. When the fuel in the firework burns, it provides energy to the electrons in the atoms of the color-producing chemicals. This energy boost moves these electrons from their ground state to an excited state, a higher energy level. However, these excited electrons don't stay in this state for long. They quickly return to their ground state, releasing the excess energy in the form of light. The frequency, and hence the color of this light, is determined by the energy difference between the two states, a principle given by the Planck-Einstein relation.