HomeArticlesOptics & Light

Thin-Film Interference: Where Soap-Bubble Colours Come From

Light bounces off both faces of a thin film and interferes with itself — the path difference depends on thickness and angle, so the colour shifts as you tilt your head.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Two reflections, one interference pattern

A soap film or an oil slick is thin enough that light hitting it produces two distinct reflected beams: one that bounces straight off the top surface, and one that travels into the film, bounces off the bottom surface, and travels back out. Because both beams originate from the same incoming wave and end up travelling in the same direction toward your eye, they overlap and interfere. Whether that interference is constructive (bright) or destructive (dark, or missing that colour) depends entirely on the extra distance the second beam travelled inside the film, compared to the wavelength of the light.

Because that path difference depends on wavelength, different colours of white light interfere constructively at different film thicknesses. A film of one exact thickness reinforces red and cancels blue; a slightly thicker or thinner patch reinforces a different colour — which is exactly the swirling rainbow pattern you see on the surface of a soap bubble, where the film's thickness is constantly changing under gravity and evaporation.

live demo · two reflected wavefronts interfering across a thin film● LIVE

The optical path difference and the half-wave shift

The condition for constructive or destructive interference depends on the film's refractive index n, its physical thickness t, and the angle of refraction θ the light takes inside the film — plus one subtlety that trips people up constantly: a reflection off a boundary where the refractive index increases flips the wave by half a wavelength (exactly like a wave on a rope reflecting off a wall it can't move), while a reflection off a boundary where the index decreases does not. For a soap film in air (low-high-low index), only the top reflection is flipped, so the two reflected beams start out already half a wavelength out of step before either has travelled any extra distance:

optical path difference (extra distance travelled inside the film):

  delta = 2 * n * t * cos(theta)

one reflection flipped by half a wavelength (soap film in air):

  constructive (bright):   delta = (m + 1/2) * lambda      m = 0, 1, 2, ...
  destructive  (dark):     delta =  m * lambda

zero or two flips (e.g. anti-reflection coating on glass):

  constructive (bright):   delta =  m * lambda
  destructive  (dark):     delta = (m + 1/2) * lambda

That is also why a soap film always looks dark (not bright) right before it pops: once the film is thinner than about a quarter of the shortest visible wavelength, the path difference from thickness alone becomes negligible, and the single unmatched half-wave flip forces destructive interference for every colour at once, so almost no light reflects back at all — you're looking straight through it.

Anti-reflection coatings run the effect in reverse

Engineers deliberately deposit a thin coating on camera lenses and eyeglasses, chosen with a refractive index between air and glass and a thickness of a quarter-wavelength, so that the reflection from the top of the coating and the reflection from the coating-glass boundary destructively cancel for the wavelength of interest (usually tuned toward the middle of the visible spectrum, green-yellow, which is why coated lenses often show a faint purple tint — the leftover, imperfectly cancelled red and blue). Multi-layer coatings stack several such films tuned to different wavelengths to suppress reflection across almost the whole visible range at once, which is standard practice in modern camera and telescope optics.

Newton's rings and measuring nanometres with visible light

Press a slightly curved lens down onto a flat glass plate and you get a thin, wedge-shaped air gap between them whose thickness increases outward from the point of contact — shine light through it and you see concentric bright and dark rings, Newton's rings, each ring marking a contour of constant path difference. Because visible light has a wavelength around 500 nanometres, and interference is sensitive to path differences of a fraction of that, thin-film interference is one of the most precise and low-tech ways to measure extremely small thicknesses and surface flatness — the same principle, refined into laser interferometry, underlies precision manufacturing metrology and, at the extreme end, gravitational-wave detectors.

Frequently asked questions

Why does a soap bubble's colour change as it gets thinner?

The colour that constructively interferes depends directly on the film's thickness, so as gravity drains the soap film and it thins over time, the wavelength selected for reinforcement shifts continuously — you see it sweep through the rainbow. Just before the film pops, it typically appears black, because it has become thinner than about a quarter of the shortest visible wavelength and every colour is destructively cancelled at normal incidence.

Why does an oil slick look different when you view it from a different angle?

The optical path length through the film depends on the angle of the light inside it, not just the film's physical thickness, so tilting your viewpoint changes which wavelength satisfies the constructive-interference condition for the light reaching your eye. A fixed physical thickness can therefore show completely different colours from different angles — this angle dependence is called iridescence.

What is the half-wave phase shift and why does it matter?

A light wave reflecting off a boundary where the refractive index increases (going from a lower-index medium into a higher-index one) is flipped by half a wavelength, exactly like a wave on a rope reflecting off a fixed end; reflecting off a decreasing-index boundary is not flipped. Whether zero, one, or two such flips occur in a given film changes constructive interference into destructive interference and vice versa, so it has to be tracked carefully to get the colours right.

Try it live

Everything above runs in your browser — open Thin-Film Interference and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Thin-Film Interference simulation

What did you find?

Add reproduction steps (optional)