Soap bubbles aren’t just fun to play with—they’re also tiny physics lessons floating in the air. Those swirling rainbow colors you see on a bubble aren’t actually “on” the soap. They’re created by the way light interacts with the thin film of soapy water.

A soap bubble is made of a very thin layer of water sandwiched between two layers of soap. This thin film is often only a few hundred nanometers thick—much thinner than a human hair. When white light from the sun (which contains all colors) hits the bubble, some of the light reflects off the outer surface of the film, and some passes through and reflects off the inner surface.

Now you have two reflected light waves: one from the outside of the film and one from the inside. As they come back toward your eyes, they can either add together or cancel each other out. This process is called interference.

Whether a color is bright or disappears depends on two main things:

  1. Thickness of the film – The bubble’s film is not the same thickness everywhere. Gravity pulls the water downward, so the top of the bubble is usually thinner than the bottom. Different thicknesses favor different colors. For example, in one area, the thickness might enhance blue light, while in another, it might enhance red.
  2. Wavelength (color) of the light – Each color of light has a different wavelength. When the distance the light travels inside the film matches certain conditions, that color is strengthened (constructive interference). When it mismatches, that color fades (destructive interference).

Because the thickness of the bubble is always changing—thanks to gravity, air movement, and evaporation—the patterns are constantly shifting. That’s why the colors seem to flow and swirl around the surface.

The angle you’re looking from also matters. Changing your viewing angle changes the path the light takes through the film, so different colors can appear or disappear as you move.

So those beautiful rainbow patterns aren’t painted on the bubble at all. They’re a living picture of how light waves interact with a thin film—an everyday example of physics happening right in front of your eyes.