Why Soap Bubbles Show Rainbow Colors

Photo: Pilan Filmes / Pexels
A soap bubble contains no pigment, no dye, and no colored chemical of any kind, yet it displays a shifting rainbow on its surface. The color comes from thin-film interference — a wave-optics effect that occurs when a film is thin enough, roughly 100 to 1,000 nanometers, that light bouncing off its two surfaces overlaps and reinforces or cancels itself depending on wavelength. The same physics colors oil slicks on wet pavement, certain butterfly wings, and the "Newton's rings" pattern first documented in the 17th century.
What a bubble film actually is
A soap bubble is not a solid membrane. It is a three-layer sandwich: a thin sheet of water held together by soap molecules on both the inside and outside surfaces. Surfactant — a soap molecule with a water-loving (hydrophilic) head and a water-repelling (hydrophobic) tail — lines both faces of the water layer, tails pointing outward into the air, heads pointing inward into the water. This arrangement is what lets a normally fragile sheet of water stretch into a dome that survives being blown, tossed, and bounced off a hand for several seconds before it pops.
The total thickness of that sandwich starts out, immediately after blowing, at roughly one to several micrometers (a micrometer is one-millionth of a meter, and a soap film at that stage is thinner than a human hair, which averages around 70 micrometers across). Within seconds, two forces begin thinning it further. Gravity pulls water downward through the film in a process called drainage, and evaporation removes water molecules from the surface directly into the surrounding air. Both processes push the film thickness down into the range where visible light wavelengths, roughly 380 to 700 nanometers, start to matter for how the film reflects light.
This is the detail that makes bubbles behave so differently from a static soap film on a wire frame, which physicists sometimes use in lab demonstrations because it can be held nearly stationary. A free-floating bubble is a moving target optically. Its thickness is never uniform and never fixed, which is exactly why the colors on a real bubble swirl and drift rather than sitting still. Understanding that the film is dynamic, not painted, is the first step to understanding why the colors behave the way they do.
Two reflections, one interference pattern
Light hitting a soap bubble does not simply bounce off a single surface the way it does off a mirror. It reflects twice: once off the outer boundary between the surrounding air and the soap film, and again off the inner boundary between the soap film and the air trapped inside the bubble. Because the film is only a few hundred nanometers thick, these two reflected light waves leave the film only a fraction of a wavelength apart and travel back to your eye essentially together.
When two light waves of the same wavelength arrive together but slightly out of step with each other, they interfere. If the two waves are in step, or "in phase," their peaks and troughs line up and the light gets brighter at that wavelength; this is constructive interference. If they are exactly out of step, one wave's peak lands on the other's trough, and the two cancel each other out at that wavelength; this is destructive interference. Which of the two happens for any given wavelength of light depends on exactly how much extra distance the second reflected wave traveled inside the film compared to the first, a quantity called the optical path difference.
The path difference depends on two things: how thick the film is at that exact point, and the refractive index of the soap solution — a number describing how much slower light travels through the film compared to a vacuum, typically about 1.33 to 1.36 for a soapy water film, close to the 1.33 refractive index of pure water (Hecht, Optics, 5th ed., 2016). For a given thickness and refractive index, the condition for constructive interference at a specific wavelength is approximately 2nt = (m + ½)λ, where n is the refractive index, t is the film's thickness, m is a whole number, and λ is the wavelength of light in question. Because visible light spans wavelengths from about 380 nanometers (violet) to 700 nanometers (red), a given thickness will satisfy that constructive condition for one wavelength while destructively canceling others, which is why a single point on a bubble shows one dominant hue rather than white light.
Because bubble film thickness varies continuously across the surface — thicker near the bottom where gravity has pulled more liquid, thinner near the top — different regions satisfy the constructive-interference condition for different wavelengths simultaneously. That is the direct, physical reason a single bubble displays bands of red, green, and violet at once instead of one uniform tint.
Why the colors look "washed out" compared to a rainbow
A rainbow separates white light into a clean, continuous spectrum through refraction and internal reflection inside raindrops (a different mechanism, discussed in how rainbows and light dispersion work). Thin-film colors are narrower interference bands layered on top of ordinary reflected white light, so they tend to look pastel, metallic, or oily rather than saturated. The mix of many overlapping constructive and destructive zones at slightly different thicknesses also blends adjacent colors together, softening the effect further.
Why bubbles change color as they thin
A freshly blown bubble frequently looks silvery-white rather than colorful. At that stage the film is often thicker than about 1,000 nanometers, and at that thickness the constructive-interference peaks for different visible wavelengths sit so close together that they overlap and blend into something close to unfiltered reflected white light rather than a single visible band.
As drainage and evaporation thin the film over the following seconds to tens of seconds, the thickness drops into the few-hundred-nanometer range, and the constructive-interference peaks for different wavelengths separate out. This is the point at which vivid, sharply defined color bands appear, typically arranged as roughly horizontal rings or streaks because gravity drains the film unevenly, leaving it thinnest near the top of the bubble and thickest near the bottom. Watching a bubble closely during this stage, the bands visibly drift downward and morph as the thickness profile keeps shifting, second by second.
When the film thins below roughly one-tenth of the shortest visible wavelength, destructive interference cancels essentially all visible wavelengths simultaneously at that spot, not just one. There is effectively no thickness left capable of reinforcing any color, so the film reflects almost nothing and looks black against a darker background, even though a truly empty film (zero thickness) would obviously reflect nothing at all. This black-film stage tends to appear at the very top of the bubble first, since that is where drainage has thinned the film the most, and it typically precedes popping by well under a second.
Does temperature or soap type change the effect?
Yes, indirectly. Warmer air speeds evaporation, thinning bubble film faster and making the color-shift sequence play out more quickly. Soap solutions with added glycerin or sugar slow evaporation and drainage, which is why bubble-solution recipes aimed at long-lasting "giant bubbles" often add these ingredients — the film survives longer in the vivid-color stage before reaching the black-film stage and popping.
Newton's historical observations of thin-film color
The rings of color seen when a curved piece of glass is pressed against a flat piece of glass are named Newton's rings, after Isaac Newton, who described and measured them in detail in his 1704 treatise Opticks. Newton was not the first to observe the phenomenon; Robert Hooke had reported similar colored-ring patterns in thin films earlier, and the historical record credits Hooke with the initial observation even though Newton's name stuck to the effect (Wikipedia, "Newton's Rings," accessed 2026; see also Hecht, Optics, 2016, for the physics history). Newton and Hooke disagreed sharply about what light actually was: Newton favored a corpuscular (particle) theory, while Hooke argued for a wave theory, and the colored rings became one of the pieces of evidence debated in that dispute for decades before wave optics was more firmly established in the early 1800s by Thomas Young's interference experiments.
What Newton's rings and a soap bubble have in common at the physics level is the thin layer of air or film trapped between two reflecting surfaces. In the classic Newton's rings setup, that layer is a thin wedge of air trapped between a curved lens and a flat glass plate, thickest at the edges of the contact point and thinning to essentially zero at the center. In a soap bubble, the thin layer is liquid soap film instead of trapped air, but the underlying mechanism, two reflections off surfaces bounding a thin transparent layer interfering with each other, is identical. Physicists still use Newton's-rings-style setups today to test how accurately a lens surface has been ground, because the interference pattern reveals thickness variations smaller than a single wavelength of light (Hecht, Optics, 5th ed., 2016).
Where else you can see the same physics
Thin-film interference is not unique to soap. It shows up anywhere a very thin transparent or semi-transparent layer sits on top of a reflective surface, at a thickness comparable to a wavelength of visible light. Three familiar examples make useful comparisons because they share the same underlying mechanism but differ in material, thickness stability, and cause.
An oil slick on wet pavement works almost exactly like a soap bubble: a thin oil layer floats on water, and light reflects off the air-oil boundary and the oil-water boundary, interfering the same way. Because oil has a higher refractive index than soapy water (typically around 1.5 for petroleum-based oils versus roughly 1.33 to 1.36 for soap film), the exact colors and their positions differ slightly, but the mechanism, thickness-dependent constructive and destructive interference, is unchanged.
Butterfly wings and some beetle shells get their blue-green iridescent sheen from thin-film interference too, but the "film" there is not liquid at all. It is a rigid, layered nanostructure built into the wing scale or exoskeleton itself, sometimes called a photonic structure — repeating layers of chitin and air spaced at nanometer scale that reflect light the same way a soap film does. Because the structure is solid and fixed rather than draining and evaporating, the color on a butterfly wing does not shift over seconds the way a bubble's does; it only changes with viewing angle, which is why these colors are called structural color rather than pigment color.
Anti-reflective coatings on eyeglass lenses and camera optics deliberately engineer thin-film interference for the opposite goal: instead of producing visible color, manufacturers choose a coating thickness and refractive index specifically to make destructive interference cancel out reflected light across most of the visible spectrum, so more light passes through the lens instead of bouncing back. A faint purple or greenish tint sometimes visible on coated lenses at an angle is the residual color left over where the cancellation is imperfect at the spectrum's edges.
| Example | Film material | Typical thickness | What controls the color | How stable is the pattern |
|---|---|---|---|---|
| Soap bubble | Soapy water | ~25–1,000 nm | Drainage + evaporation thinning over seconds | Constantly shifting, seconds to minutes |
| Oil slick on pavement | Petroleum oil on water | ~50–1,500 nm | Oil spreading unevenly across the water surface | Slowly shifts as oil spreads or disperses |
| Butterfly wing / beetle shell | Rigid chitin/air nanolayers | ~100–300 nm (fixed) | Viewing angle, not time | Fixed structure; color only changes with angle |
| Anti-reflective lens coating | Engineered dielectric film | ~100–150 nm per layer | Deliberately tuned to cancel reflection, not produce it | Permanently fixed by manufacturing |
All four examples rely on the same two-reflection interference mechanism; what differs is whether the film is liquid or solid, and whether its thickness is designed to stay put or drift.
What people get wrong about bubble colors
The most common misconception is that soap itself is faintly colored and that the rainbow is some kind of chemical tint becoming visible. Soap solution is essentially colorless in bulk; you can pour a glass of soapy water and see no rainbow in it at all, because bulk liquid is far thicker than the nanometer-scale range where interference effects operate. Color only appears once the liquid is stretched into a film thin enough to be comparable to a wavelength of visible light, which is a geometric condition, not a chemical one.
A second, related mix-up is confusing thin-film interference with diffraction, the spreading and bending of light around obstacles or through narrow slits, which produces different-looking colored fringes, for instance on a CD or DVD surface, through an entirely separate mechanism involving light bending around a regularly spaced physical grating rather than reflecting off two closely spaced surfaces. Both are wave-optics effects and both produce unexpected color from a "colorless" object, but the physical setup is different: interference in a bubble needs two reflecting surfaces close together; diffraction on a CD needs a regularly repeating physical structure that light bends around.
A third misconception is assuming the black-film stage right before a bubble pops means the film has become perfectly transparent. It has not. The black film still has measurable thickness and still reflects a small amount of light, just canceled almost completely across the visible spectrum by destructive interference at that specific thickness. It is closer to "reflects nearly nothing" than "reflects nothing at all," and under very bright, controlled lighting a faint gray tinge is sometimes still detectable in the black-film region just before rupture.
Why bubbles pop and how physics tries to stop them
A soap bubble is fighting a losing battle from the moment it forms. Three separate processes work against it simultaneously: gravity-driven drainage pulling liquid toward the bottom, evaporation stripping water molecules off the surface into dry air, and any outside disturbance, a stray air current, a speck of dust, or simple contact with a dry surface, that can puncture the film outright. The colorful, thinning journey described above is really a race against the moment when one of these three finally wins.
What is remarkable is not that bubbles pop, but that they last as long as they do. A film only a few hundred nanometers thick, thinner than a wavelength of light, ought to be far too fragile to survive being tossed through the air. It survives because of a self-correcting mechanism called the Marangoni effect, named after the 19th-century Italian physicist Carlo Marangoni, who first described how surface tension differences drive fluid flow. When a spot on the bubble's surface gets stretched thin, the soap surfactant molecules there spread apart and become less concentrated, which locally raises that spot's surface tension. Because regions of higher surface tension pull harder than regions of lower surface tension, that stretched, high-tension spot yanks nearby liquid and surfactant back toward itself, thickening the thin spot again before it can rupture. This dynamic surfactant-gradient response is a documented stabilizing mechanism for foam and soap films (Royal Society Publishing, "Effect of surfactant redistribution on the flow and stability of foam films," 2020).
The Marangoni effect is why an established soap bubble, past its first fragile instant, can survive gentle bouncing on a hand or a light breeze: minor local thinning triggers its own repair before it becomes a hole. But the effect has limits. It cannot outrun evaporation forever, since evaporation removes water from the entire film's surface continuously rather than from one thin spot alone, and it cannot compensate once the film has thinned globally into the sub-25-nanometer black-film regime described above. At that point the film has essentially no reservoir of liquid left to redistribute, and rupture, triggered by nothing more dramatic than a random thermal fluctuation or a passing air current, becomes a matter of when, not if.
What Plateau's laws reveal about how soap films connect
Soap-film physics extends well beyond single bubbles. When multiple soap films meet, at the junctions of a foam, or where two touching bubbles share a wall, they always arrange themselves according to a small set of geometric rules first described experimentally by the Belgian physicist Joseph Plateau in the 19th century. Plateau observed that soap films always meet in threes along an edge, called a Plateau border, and always at an angle of exactly 120 degrees, and that four of these borders in turn meet at a single vertex at the tetrahedral angle of approximately 109.5 degrees (Wikipedia, "Plateau's Laws," accessed 2026; see also HandWiki, "Plateau's Laws"). Any other junction angle is geometrically unstable, and a film forced into a different configuration will rearrange itself toward the 120-degree pattern almost immediately.
The underlying reason is that a soap film, left alone, settles into whatever shape has the least possible surface area for the boundary conditions it is given, since less surface area means less surface tension energy stored in the film, a state physicists call a minimal surface. That is why a soap film stretched across a wire loop of any shape, however irregular, pulls itself into the smoothest, least-wrinkled surface that fits the loop's boundary. It took mathematicians more than a century after Plateau's original observations to formally prove that his 120-degree and 109.5-degree rules were mathematically the only stable solutions, a proof finally completed by the American mathematician Jean Taylor in 1970 (Wikipedia, "Plateau's Laws," accessed 2026). Engineers and architects have borrowed this soap-film logic directly: the tent-like roof of the Munich Olympic Stadium, designed by architect Frei Otto, was physically modeled using scaled soap-film and fabric surfaces specifically because minimal-surface shapes distribute structural tension as efficiently as physics allows.
What this means
A soap bubble's rainbow is not a coating, a dye, or a coincidence, it is a direct, measurable readout of the film's thickness at every point on its surface, changing in real time as gravity and evaporation thin the film toward its final collapse. The same interference math, two reflected waves reinforcing or canceling depending on thickness and wavelength, explains oil-slick colors, structural color in insects, and the deliberately engineered anti-glare coating on your glasses, which means a five-second soap bubble is, in miniature, demonstrating one of the same wave-optics principles that Newton and Hooke argued over three centuries ago and that optical engineers still rely on today.
FAQ
Q: Why do soap bubbles have rainbow colors if soap is colorless?
The colors come from thin-film interference, not pigment or dye. Light reflects off both the outer and inner surfaces of the soap film, and those two reflections combine constructively or destructively depending on the film's thickness at that point, producing visible color bands where soap solution itself has no color.
Q: Why do the colors on a soap bubble keep changing?
Gravity drains liquid downward and evaporation removes water from the surface, so the film's thickness at any given point keeps decreasing over seconds to minutes. Since the interference color depends directly on thickness, the visible pattern shifts and swirls continuously as the bubble's geometry evolves.
Q: Why does a bubble turn black right before it pops?
When the film thins to roughly 25 nanometers or less, thinner than the shortest visible light wavelength, destructive interference cancels nearly all visible wavelengths simultaneously at that spot, leaving it reflecting almost no light and appearing black just before rupture.
Q: Is the rainbow color on an oil slick the same phenomenon as a soap bubble?
Yes. An oil film floating on water produces thin-film interference through the same two-reflection mechanism, light bouncing off the air-oil boundary and the oil-water boundary and interfering based on thickness, which is why oil slicks on wet pavement show similar rainbow banding to bubbles.
Q: What determines which color appears at a given spot on a bubble?
The local film thickness at that spot, combined with the refractive index of the soap solution and the viewing angle, determines which wavelength of light satisfies the constructive-interference condition there. Different thicknesses across the bubble's surface produce different colors simultaneously.
Q: What are Newton's rings and how do they relate to soap bubbles?
Newton's rings are concentric colored bands seen when a curved lens is pressed against a flat glass plate, caused by thin-film interference in the wedge of air trapped between them. Isaac Newton documented them in detail in Opticks (1704), though Robert Hooke observed the effect earlier; the mechanism is the same two-surface reflection interference that colors soap bubbles, just with trapped air instead of liquid film.
Q: Do butterfly wings use the same physics as soap bubbles?
Yes, in principle, though the material differs. Some butterfly wings and beetle shells get their iridescent color from rigid, layered nanostructures that reflect light through thin-film interference, called structural color, rather than from a liquid film. Unlike a bubble, this fixed structure only changes color with viewing angle, not over time.
Q: Why don't soap bubbles pop the instant they're blown, given how thin the film is?
A self-correcting mechanism called the Marangoni effect keeps a freshly blown bubble stable. When part of the film stretches thin, surfactant molecules there spread apart, locally raising surface tension, which pulls surrounding liquid back into the thin spot before it can rupture. This repair mechanism eventually loses the race against evaporation and drainage, which is why every bubble pops in the end.
Q: What are Plateau's laws for soap films?
Plateau's laws, described by Belgian physicist Joseph Plateau in the 19th century, state that soap films always meet in threes at 120-degree angles along a Plateau border, and that four such borders always meet at a single vertex at roughly 109.5 degrees. These angles are the only stable configurations for a film seeking the minimum possible surface area, a rule mathematicians didn't formally prove until 1970.
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles



Why Is Glass Transparent? The Physics of Light Passing Through
Glass is transparent because visible photons lack the energy to excite its electrons and its uniform, grain-free structure scatters almost nothing sideways.

Structural Battery Composites Explained: When Materials Carry Loads and Store Energy
Structural battery composites let carbon fiber carry loads and store energy. See how they work, what the lab numbers mean, and why products are still rare.

