🫧 Everyday Mysteries 🌈 Light No background needed ~5 min read

Why Do Soap Bubbles Look Rainbow-Colored?
― The Colors Come from a Different Trick Than a Rainbow

On the surface of a soap bubble, you'll see a shimmering, shifting rainbow pattern, much like an oil film floating on water. You might assume "a soap bubble is just a kind of rainbow" β€” but its colors actually come from a completely different mechanism than the rainbow in the sky. A rainbow's colors appear because light "splits apart." A soap bubble's colors appear because light "overlaps."

Published: 2026.08.17 Difficulty: β˜…β˜†β˜† (no background needed) Formulas appear only in the final collapsible section
First, think back

Blow a soap bubble, and a rainbow-like color pattern appears on its surface. Because you see reds, greens, and purples lined up, just like in a rainbow in the sky, it's tempting to assume it's "the same mechanism."

But look closely at a soap bubble's colors, and you'll spot a crucial difference from the sky's rainbow. A rainbow is a fixed-shape band where the colors always line up in the same order. A soap bubble's colors, on the other hand, keep swirling and changing shape every time the film wobbles.

This difference tells us that the very principle behind how the colors are created is fundamentally different.

1
A rainbow forms when light "splits"

Inside a raindrop, light refracts at a slightly different angle for each color and splits apart (disperses), and this creates the rainbow's colors.

2
A soap bubble forms when light "overlaps"

Light reflected off the front and back of a soap bubble's film overlaps (interferes), and only the colors that reinforce each other become visible.

"Color made by splitting" versus "color made by overlapping" β€” let's look at this difference step by step.

β‘  Rainbow ― Color splits inside a raindrop Sunlight Red Green Violet Each color bends at a different angle, so paths split apart β‘‘ Soap bubble ― Light overlaps front & back of film Thin soap film Front-surface reflection Back-surface reflection The two reflections overlap; only reinforced colors show
Figure 1: The left panel (β‘ ) shows how a rainbow works. Inside a raindrop, each color refracts at a slightly different angle, so the light splits apart as it travels. The right panel (β‘‘) shows how a soap bubble works. Light reflected off the film's front surface and light that passes through and reflects off the back surface overlap at your eye, and only the colors that reinforce each other stand out. These are two completely different phenomena.

A Rainbow Is "Dispersion," a Soap Bubble Is "Interference"

As explained in detail in another article, a rainbow occurs because when light refracts inside a raindrop, each color (wavelength) bends at a slightly different angle. This is called dispersion. A single beam of white light "splits" into many beams of different colors β€” that's how a rainbow works.

A soap bubble's colors work completely differently. A soap bubble's film is a soap-water film so extremely thin that it approaches the wavelength of visible light. When light hits this film, part of it bounces off the front surface, and the rest passes through the film and bounces off the back surface as well.

When the "light reflected off the front" and the "light reflected off the back" travel in the same direction and overlap, the crests of the waves reinforce each other where they align, and cancel out where a crest meets a trough. This is called light interference.

A rainbow's colors come from light "splitting apart" by color.
A soap bubble's colors come from light "overlapping."

The Film's Thickness Decides Which Color You See

Which color reinforces depends on the film's thickness. Where the film is slightly thicker, one color (say, blue) reinforces; where it's slightly thinner, a different color (say, red) reinforces.

A soap bubble's film gradually drains downward under gravity, so its thickness varies from place to place. As a result, a swirling pattern of colors appears on the film's surface, corresponding to these thickness differences. As the film wobbles, the thickness distribution shifts too, so the color pattern keeps changing constantly. That's why, unlike the sky's rainbow, a soap bubble's colors never stay still.

Just Before It Pops, a Soap Bubble Turns "Transparent Black"

Just before a soap bubble pops, part of the film can turn into a dark patch that barely reflects any surrounding light. This is thought to happen because the film becomes far thinner than the wavelength of light, so the front and back reflections cancel each other out almost completely. In other words, it's not that the color disappears β€” it looks black because every color cancels out at once.

Try It Yourself

πŸ§ͺ Watch a soap bubble's colors move closely
  1. Make a soap bubble with soapy water (or stretch a film of soap solution across a ring) so that it stays intact as long as possible without popping
  2. In a bright spot, watch the color pattern on the film's surface for several tens of seconds
  3. Confirm that the color pattern gradually shifts in a swirling motion
  4. Just before it pops, look for a patch that appears to turn dark

The moving color pattern is proof that the film's thickness keeps changing over time. This is something you will never see in the sky's rainbow.

Summary

A soap bubble's rainbow colors look similar to a sky rainbow but come from a completely different mechanism. A rainbow's colors come from "dispersion," where light splits apart by color. A soap bubble's colors come from "interference," where light reflected off the front and back of the film overlaps. Because the visible color changes every time the film's thickness changes, a soap bubble's pattern keeps moving constantly.

A soap bubble is not a tiny rainbow.
It's an entirely different kind of art, made from light overlapping with itself.

There are other phenomena that create color purely through interference, without any pigment. For why an opal shines in rainbow colors, see this article.

Want to know more? ― Terms, numbers, and links to the textbookWe label each section by level, from middle-school science to topics still being researched
How to read the level labels below
  • MSCovered in middle-school science
  • HSCovered in high-school "Physics"
  • HS+Covered in high-school "Physics," or treated as advanced/sidebar content in textbooks
  • Univ.Not covered in high school β€” a university-level specialist topic (optics)
  • ResearchNot yet settled "textbook fact" even at university β€” something researchers are actively studying

MSTerms: Words behind a soap bubble's colors

HSChecking with a formula: Just how thin is a soap bubble's film?

Let's actually calculate the film thickness needed for a given color (wavelength) of light to reinforce.

β‘  First, the formula itself

Film thickness Γ— refractive index Γ— 2 = (reinforcing order οΌ‹ 0.5) Γ— wavelength

Film thicknessIn nm (nanometers, one-billionth of a meter)
Refractive indexFor a soap film, close to water's, about 1.33
Reinforcing orderAn integer: 0, 1, 2, and so on. The thinnest case is 0
WavelengthThe value corresponding to the light's color, in nm

The "οΌ‹0.5" appears in the formula because the crest-and-trough position of the light wave shifts by half a wave between the front-surface reflection and the back-surface reflection. This is explained in detail in the HS+ section below.

β‘‘ Calculating for green light (wavelength 550 nm)

Let's find the thickness at which green light reinforces in the thinnest case (order 0).

Refractive index Γ— 21.33 Γ— 4 = 5.32
Wavelength Γ· (indexΓ—2)550 Γ· 5.32 β‰’ 103.4
Film thickness (thinnest case)Approx. 103.4 nm

1 nm (nanometer) is one-billionth of a meter. This tells us that green interference first occurs at a mind-bogglingly thin scale β€” roughly 1/1000th the thickness of a human hair.

Increase the order by one, and the same color reinforces at a different thickness too.

Right side at order 11.5 Γ— 550 = 825
Film thickness (order 1)825 Γ· 2.66 β‰’ 310.2
Film thickness (order 1)Approx. 310.2 nm

So the same green color can reinforce at multiple thicknesses β€” around 103 nm and around 310 nm. Because the film's thickness varies slightly from place to place, a variety of color patterns appear across the bubble's surface.

β€» An actual soap bubble's film thickness varies with location and time; the figures here are just one example of the conditions under which a given color reinforces.

HS+Why Is "οΌ‹0.5" Needed?

Light has a property where, when it reflects at a boundary going from a lower-refractive-index material to a higher one, its phase shifts by half a wavelength. For a soap bubble's film, this shift happens at the front surface (air β†’ soapy water), but not at the back surface (soapy water β†’ air). The "οΌ‹0.5" term is needed in the formula to capture this shift, which occurs on only one side.

Univ.Thin-Film Interference Is Also Used in Everyday Technology

The principle of thin-film interference is also applied in anti-reflective coatings used on camera lenses and eyeglasses. By precisely tuning the film's thickness, you can cancel out reflection at a specific wavelength and let more light pass through the lens. A similar principle to thin-film interference is also thought to be involved in "structural color" β€” color produced not by pigment but by microscopic structures β€” as seen in the wings of morpho butterflies and peacocks.

ResearchWhat's Still Not Fully Understood

Even the everyday behavior of a soap bubble opens onto the deep, still-unfolding world of thin-film physics.

Links to the Textbook (by Level)

LevelSubject/UnitWhere in this article
MSScience ・ Properties of lightBasic terms: dispersion, interference, thin film
HSPhysics ・ Wave interferenceCalculating film thickness from the thin-film interference formula
HS+Physics ・ Reflection and phase of wavesThe phase shift on reflection (meaning of οΌ‹0.5)
Univ.Optics ・ Materials scienceAnti-reflective coatings, structural color
ResearchSoft matter physics (ongoing research)Thin-film drainage and stability, artificial structural color
References & Sources
  1. Physics textbook coverage of thin-film interference (light interference).
  2. Optics textbook coverage of phase shift on reflection and anti-reflective coatings.
  3. Soft matter physics research literature on soap-film drainage and stability (the Marangoni effect).
  4. Research review on structural color (color produced by microscopic structures, such as morpho butterfly wings).
  5. Interface science textbook coverage of surfactants and film stability.

β€» The refractive index, wavelength, and film-thickness figures are representative estimates. An actual soap bubble's film thickness and color appearance can vary depending on observing conditions.

β€»This article is a general-audience science explainer. When playing with soap bubbles, take care not to swallow the solution or get it in your eyes, and please check the product's usage precautions.