Chemistry & Materials

Why Do Soap Bubbles Have Rainbow Colours?

A soap bubble has no paint, yet its skin glows with rainbow colours. The secret is light bouncing off two surfaces of a film about as thick as the wavelength of light.

By William, real-life teacher 8 min read

Illustration of several soap bubbles drifting over a garden lawn in soft morning light, their thin walls showing faint pink, gold, green and blue sheens.
Soap bubbles shimmer with colour in soft morning light. Illustration.

Blow a bubble on a bright day and you may see pink, gold, green and blue sliding slowly across its skin. Soap does not contain paint, and the bubble wall is so thin that you can see through it. So where do the rainbow colours come from?

The short answer: The colours come from light bouncing off both surfaces of the very thin soap film. The two reflections overlap, and they either strengthen or cancel each other depending on the colour of the light and the thickness of the film. Because the film is thicker in some places than others, different colours appear in different places.[1][2]

A bubble wall is a very thin film

The wall of a soap bubble is a thin layer of soapy water. The Experimentarium, a Danish science centre, gives the thickness of a soap film as 5 to 5,000 nanometres.[2] Visible light has wavelengths of about 380 to 760 nanometres, so the film is roughly the same size as the light waves that hit it.[2]

Water makes up most of the film. Water has a refractive index of 1.33 at 20 °C, which means light travels about 1.33 times more slowly in water than in air.[3] In the calculations below we use n = 1.33 for the film, which is a reasonable approximation for a soap film.

Illustration: a close-up of a large soap bubble filling the frame, its thin film showing swirling bands of pink, gold, green and blue, with a darker patch near the top.
As the film thins, its colours swirl and shift, and the top can turn almost black before it bursts. Illustration.

Light bounces off two surfaces

When light reaches a bubble, some of it reflects from the outside surface and some reflects from the inside surface. Both reflected beams can reach your eye at the same time.[1]

The two reflections are not identical. The Exploratorium explains that light reflecting from the outside surface has its wave direction reversed, while light reflecting from the inside surface does not.[1] This flip matters for the colours, as we will see.

The light that reflects from the inside surface has also travelled through the film, down and back up. That extra journey is roughly twice the thickness of the film, and the difference in distance between the two reflections is called the path difference.

Diagram: light hits a soap film. One reflection comes from the outer surface and flips, another from the inner surface and does not. Both head back to the eye.
Light reflects from both surfaces of the film. The outer reflection flips, the inner one does not.

Waves can add or cancel

Light is a wave. When two waves overlap, their peaks can line up and reinforce each other, or a peak can meet a trough and the two cancel out. This is called interference.[1]

For a soap film in air, the outside reflection causes a flip, and the textbook result is that two reflections reinforce each other (give a bright colour) when

2 n d cos r = (m + ½) λ, where m = 0, 1, 2, and so on.[4]

Here n is the refractive index of the film, d is its thickness, r is the angle of the light inside the film, and λ is the wavelength of the light. When you look at a bubble almost straight on, cos r is close to 1, so the rule becomes 2nd ≈ (m + ½)λ.

Thickness picks the colour

The equation links three things: the colour (wavelength), the thickness and the number m. Change the thickness and a different colour is reinforced. The Stony Brook Laser Teaching Center puts it this way: the wavelengths that are enhanced or diminished are determined by the thickness of the film and its index of refraction.[5] The Exploratorium says that the colours depend upon the film’s thickness.[1]

Using the simplest case, m = 0, the thickness that reinforces a colour is d = λ ÷ (4n). With n = 1.33:

  • Blue light (450 nm) is reinforced by a film about 85 nm thick.
  • Green-yellow light (550 nm) is reinforced by a film about 103 nm thick.
  • Red light (650 nm) is reinforced by a film about 122 nm thick.

The working is shown in the reference notes. These are calculated values, not measured ones.

Gravity makes the difference visible. The Experimentarium notes that gravity pulls the water in the bubble downwards, making the bubble thicker at the bottom and thinner at the top.[2] Each band of colour therefore marks a place where the film has reached a particular thickness, and the bands drift as the film moves.

Diagram: a soap film wedge, thin at the top and thicker at the bottom, with three coloured bands at 85, 103 and 122 nanometres for blue, green-yellow and red.
A thinner part of the film reinforces blue, a thicker part reinforces red. Thicknesses are calculated for n = 1.33.

Thicker parts of the film can also reinforce colours in higher orders (m = 1, 2 and so on), so the real colours are often more mixed than this simple example suggests.

Why bubbles turn black before they pop

As the film thins, the colours change in a set order. The Exploratorium describes how, as the bubble thins, some colours are cancelled out and others take their place. Eventually the bubble becomes so thin that cancellation occurs for all wavelengths, and the film looks black.[1]

Why? When the film is much thinner than the wavelength of light, the path difference is almost zero. The flip at the outside surface then makes the two reflections almost exactly opposite, so they cancel. The Exploratorium calls the black patch a warning that the bubble is about to pop.[1]

Did you know? The colours in a soap bubble do not come from the soap itself. They come from light reflected by the bubble’s surfaces.[2]

Try it: watch the colours move

You need: washing-up liquid, water, a shallow dish, a plastic bubble wand (or a loop of thin wire), and a sheet of dark paper.

  1. Mix a small amount of washing-up liquid into water in the dish. Stir gently to avoid too many small bubbles.
  2. Work in shade or on a cloudy day. Dip the wand, then blow a bubble in front of the dark paper.
  3. Watch the colours for a minute. Sketch the bands and note where they sit on the bubble.
  4. Keep watching the top of the bubble. Note the first place where it looks black.

What to expect: The colours move as the film drains downwards. The top of the bubble is the thinnest part, so it is usually the first place to turn dark.

Safety first: Keep soap solution out of your eyes and mouth, and never drink from a container that held it. Wash your hands afterwards. Don’t blow bubbles towards anyone’s face. Never look straight at the Sun, and work in shade. Younger children should do this activity with an adult.

Go deeper: the arithmetic

The reinforcement rule

The full rule for a film in air is 2nd cos r = (m + ½)λ.[4] The half in (m + ½) comes from the flip at the outside surface. Rearranging for the thickness, with cos r ≈ 1:

d = (m + ½) λ ÷ (2n)

For the first two orders, the thicknesses for three colours are:

Colour (wavelength)m = 0m = 1
Blue (450 nm)85 nm254 nm
Green-yellow (550 nm)103 nm310 nm
Red (650 nm)122 nm367 nm

Why the colours shift when you look from the side

When you look at a bubble at a slant, the light travels through the film at a different angle, so cos r is smaller than 1. The rule then gives different colours, which is why the bands seem to move when you tilt your head.[4]

Frequently asked questions

Why do soap bubbles have colours at all?

The colours come from light reflecting off the two surfaces of the thin film. The two reflections interfere, so some colours are strengthened and others are cancelled.[1]

Does the soap make the colours?

No. The colours come from light reflected in the bubble, not from the soap itself.[2]

Why do the colours move?

Gravity pulls the water downwards, so the film keeps thinning as it drains. Each colour appears where the film has the right thickness, so the bands shift.[2][5]

Why does the bubble turn black before it pops?

At the thinnest point the path difference is almost zero, so the reflections cancel for all colours and the film looks black.[1]

The big idea

Thin film, two reflections, one thickness at a time. Light reflects from both sides of a soap film. The two reflections add or cancel depending on colour and thickness, so each part of the bubble shows the colours that fit its thickness.

More from William Wonderlab:

Explore more from scientists:

References

[1] Exploratorium, “Bubble Colors” (accessed 25 October 2026)

[2] Experimentarium (Denmark), “Colours in soap bubbles” (accessed 25 October 2026)

[3] HyperPhysics, Georgia State University, “Index of Refraction” (accessed 25 October 2026)

[4] schoolphysics.co.uk, “Interference in thin films” (accessed 25 October 2026)

[5] Stony Brook University Laser Teaching Center, “Understanding Interference Patterns in Soap Films” (accessed 25 October 2026)

Keep exploring

Now try the science yourself

Reading is a great start. Experimenting is even better: these interactive models use the same science as this article.