Why Does a Flame Test Have a Colour?

Author: codeplu.com
Last Updated: 20 Oct 2026
Est. Duration: 12 min
Skill Level: Beginner

Root Concept

Heating a metal ion lifts an electron to a higher shell, and when it falls back it releases exactly the energy it gained as light — and because the gap between shells is a fixed size unique to each element, the colour given off identifies the metal.

CodePLU Goal

Upgrading Human Mental Models

Learn how to think in Workflows

Concept Playground
CodePLU logo

Concept Development By codeplu.com

The third step is the one that makes this a test. If the electron could stay where it was put, there would be no light and nothing to see.

A Colour That Identifies an Element

Dip a clean wire in a lithium compound, hold it in a Bunsen flame, and the flame turns crimson. Do it with sodium and it turns an intense yellow, with potassium a pale lilac, with copper a blue-green. The colour does not depend on which compound you used — lithium chloride and lithium nitrate give the same red — so the colour is coming from the metal and nothing else.

That makes it a test, and a remarkably quick one. It is also the oldest instrumental method in chemistry: caesium and rubidium were discovered in 1860 purely because their flame colours matched nothing known, and are named after the blue and red lines their light produced.

The usual explanation stops at "each metal gives its own colour", which is a fact rather than a reason. The reason runs through the electron arrangements the atom track set out, and it is the same reason the periodic table has the shape it does.

Heat gives an electron energy, and the electron moves to a higher shell. It cannot move any arbitrary distance — the shells are at fixed energies, so the step is a fixed size. The higher position is unstable, so the electron drops back almost immediately, and the energy it gained has to go somewhere. It leaves as light, carrying exactly the energy of the step, and the energy of a particle of light is what we perceive as its colour.

Why the Colour Is Fixed

1

Why can an electron not move any distance it likes?

Because the positions available to it are fixed, which is the central claim of the shell model the atom track introduced. An electron can sit in the second shell or the third, but not somewhere between them, in the same way that you can stand on the third or fourth step of a staircase but not halfway up the riser. To move up, an electron must receive exactly the energy of a whole step; anything less does nothing at all, and anything more leaves a remainder it cannot use. That restriction is what makes flame colours sharp and specific rather than a smear of every shade, and it is also why the shell model is worth taking seriously rather than treating as a drawing convention.

2

Why does the electron come back down?

Because the higher position is not where it is most stable, and nothing is holding it there. The flame supplies energy constantly, so electrons are being lifted continuously, but each one falls back within a tiny fraction of a second. That is what sustains the colour: the flame is not storing anything, it is running a cycle of lifting and dropping millions of times over, and the light you see is the sum of all those returns. Remove the sample from the flame and the colour stops immediately, because the supply of energy has stopped and the last electrons have already fallen. There is no afterglow, which is itself a clue that nothing was being stored.

3

Why does the size of the step decide the colour?

Because light comes in particles whose energy is fixed by their wavelength, and wavelength is what the eye reads as colour. A large energy step releases a high-energy particle, which is towards the blue and violet end, and a small step releases a low-energy one towards the red. So the colour is a direct read-out of the gap the electron fell across. Lithium gives crimson because its step is comparatively small; copper compounds give blue-green because theirs are larger. Nothing about the colour is a property of the bulk metal — a lump of lithium is a dull grey — and it belongs entirely to the electron arrangement. Colour here is a measurement of an energy gap, dressed up as something you can see.

4

Why does every element have its own colour?

Because every element has a different number of protons, so the pull on its electrons differs, so the shells sit at different energies and the gaps between them are different sizes. That is the same fact the periodic table is built on, arriving here as a colour. In practice an element emits several wavelengths rather than one, because there are several possible steps, and what you see is the combination — which is why sodium’s yellow and potassium’s lilac are so distinctive. Split that light with a prism and each element shows a pattern of sharp lines as individual as a fingerprint. Two elements can look similar to the eye and never produce the same set of lines.

Real World Example

The same mechanism at very different scales

Three Places This Shows Up

Once you recognise it, the same lifting and falling of electrons turns up in places that look nothing like a Bunsen burner.

1

Step 1

A street light: sodium, running continuously

The deep orange-yellow of an older street lamp is sodium giving off exactly the colour it gives in a flame test, generated by an electrical discharge instead of a Bunsen. The light is so narrowly concentrated at one wavelength that colours look wrong underneath it — a red car appears brown, because there is almost no red light present for it to reflect. That narrowness is the point: it comes from one specific electron step, repeated, rather than from a hot object glowing across every wavelength. A single electron step, running on an industrial scale, lights a whole street.

2

Step 2

Fireworks: the flame test as entertainment

The colours in a firework are chosen by adding metal compounds to the mixture, and the list is the flame test list. Strontium and lithium give red, barium green, copper blue, sodium yellow. A manufacturer selecting a colour is selecting an element, and the difficulty of making a good blue is a chemical difficulty rather than an artistic one — copper compounds that give the right colour tend to break down at the temperatures involved, so blue is the expensive one. The aesthetic problem and the chemical one turn out to be the same problem, which is why a firework’s colour palette has barely changed in a century.

3

Step 3

A star: the same lines, from a very long way off

Splitting starlight reveals the same sharp lines that elements produce in a laboratory, which is how the composition of something nobody can visit is known at all. The noble gases tutorial described helium being found this way in sunlight in 1868, twenty-seven years before anyone obtained it on Earth. The gaps between electron shells are identical everywhere, so a pattern measured in a test tube can be matched against one measured across a hundred light years. Nothing about the method changes with distance; only the brightness does. An element is identified the same way whether it is a metre away or unreachably far.

FAQs

Final Words

A flame test works because the colour belongs to the electron arrangement rather than to the bulk metal. Heat lifts an electron to a higher shell, and because shells sit at fixed energies the step is a fixed size — an electron cannot stop partway, any more than you can stand halfway up a stair riser.

The raised position is unstable, so the electron falls back almost at once and must release exactly the energy it took in. It leaves as a particle of light carrying that energy, and the energy of light is what the eye reads as colour. Every element has a different nuclear charge, so its shells sit at different energies and its steps differ — which is why the colour identifies the metal, and why it is the same in a street lamp, a firework and a star.

The next tutorial moves from metals to gases, where the test is not a colour but a behaviour.