Colors of a Soap Bubble

Greg A. Smith

If you have ever seen a soap bubble, you may have noticed the unusual color pattern. What causes this? Why these colors?

Colors of a popping soap bubble. (Courtesy of Matthew Dubin)

Two-wave Interference

The technical answer is two-wave interference, but let's start from the beginning. Light is a propagating wave and the spacing between peaks is known as the wavelength of light. In the image below, a wave representing a 630 nm wavelength is traveling left-to-right. We perceive this wavelength as being the color red.

Light wave propagating from left to right.

Sometimes in nature, there is not one wave, but two overlapping waves. In a simplistic view of a soap bubble, you can think of these two waves as reflecting from the outside and inside surfaces of the bubble wall. Even though the overall size of a soap bubble can be arbitrarily large, the soapy water layer is very thin with typical values from 10 nm to 1,000 nm.

In the image below, arrows represent the path traveled by light as it reflects from the bubble wall. The oscillating wave has been removed for clarity. Reflections from the inside and outside surfaces produce two new waves, but the paths are so close together we cannot see them separately. However we do see some effects when the two waves combine.

Light reflecting from inside and outside surfaces of the water layer.

The nice thing is that two waves with the same wavelength will always combine together to make a new wave. This process is known as two-wave interference and is very sensitive to the thickness of the soapy water. As the thickness changes, one wave is delayed because it takes slightly longer to travel through the soapy water. Move the slider below to see how two waves sum together when the delay changes.

Two waves sum to a new wave.
delay:

For some delay values, the two waves cancel to give a flat line. For other values, the waves add together to give a larger wave. In the diagram, the two waves add together when the delay is zero, but in a real soap bubble, the waves actually cancel because the two reflections behave differently[2].

Colors

So far a single wavelength has been considered, but to understand the color of a soap bubble, it is necessary to understand how wavelength relates to color. To keep things simple, let's begin by looking at the colors for a single wave of light.

You may have heard the eye has two different types of receptors known as rods and cones. Rods provide most night vision and have no color sensitivity, while the cones provide daytime vision with color. For daytime color vision, most people have 3 types of cones with different sensitivities to the wavelength of light.[3] Our eyes detect light with wavelengths in the range from about 400nm to 700nm as shown in the graph below.

Sensitivity of color-vision cones in eye.

The reality is that some people have 4 types of cones (tetrachromats), while others have 1 or 2 types of cones (color deficient). However this discussion assumes normal vision with three types of cones.

Unfortunately we cannot stop at discussion of the cones in the eye because the brain also plays an important role in color vision. It might be tempting to think of the three types of cones as representing sensitivity to red, green and blue colors. However studies dating back to 1931[4] show human color perception is quite different. The graph below shows how much red, green, and blue color is needed to perceptually match each wavelength of light.

Amount of red, green, and blue colors to match the perceived wavelength.

Not only is the graph different from the sensitivity of the cones, but it also has negative values! You can think of those negative values as an optical illusion. For example, if we try to match the color of 500 nm wavelength light using only green and blue lights (   ), we find the result has too much of a red hue. The negative value means we want to remove red color that does not exist.

The implication of the negative values is profound. Some colors we see cannot be represented as a combination of red, green, and blue colors! A lot of color theory, and even the display you are using to view this webpage, is based on the additive properties of red, green, and blue colors. However none of that can match the true range of our color perception.

With all that considered, the image below gives the best approximation for how people perceive colors across the visible wavelength range from 380 nm to 720 nm. Colors impossible to display are approximated by the closest valid color. Dark colors represent wavelengths of light that humans cannot easily see.

Best approximation to perceived color for each wavelength.

Those familiar with the concept of color space might know that the 1931 study[4] defines the XYZ color space, and all color transformations should occur in XYZ space for the most accurate representation of human perception.

The color bar shown above is like the rainbow we see when sunlight is separated into all the individual wavelengths. Unfortunately this does not match the color pattern of a soap bubble. We must continue.

Two-wave Colors

With an understanding of colors for a single wave, we are now ready to return to the two-wave interference. The next important idea is realizing that a delay of 200nm equals 1/2 of a wavelength for 400nm light (dim violet), but only 1/4 of a wavelength for 800nm light (very dim, dark red). This means the combined light from two-wave interference depends on the color of light.

In the animation below, change the color slider and observe how the sum of two waves also changes depending on the wavelength of light. When the sum of waves is a flat line, the color will not be seen. When the sum of two waves is large, the color will be bright. Can you find a relationship between wavelength and delay that will produce a flat line for any delay value?

Color of light affects how waves combine.
wavelength:
delay:

The very last step to understanding the color of a soap bubble is dealing with light sources that emit a range of colors. For example, sunlight creates every wavelength of light, but colors near 500 nm are slightly brighter than other colors.

When the light source creates many wavelengths of light, our eyes average the light over all wavelengths. This emphasizes some colors and de-emphasizes others. Photographers and videographers routinely adjust this averaging when they correct the white balance of their images. When you change the delay for the image below, observe how the total color is the average of the entire spectrum.

Total color is average of all wavelengths.
delay:

Pulling everything together, we have all the steps to compute the color of a soap bubble. To summarize, the process is as follows.

  1. Choose or calculate the phase delay for a thickness of soapy water.
  2. Choose a specific wavelength of light.
  3. With the phase delay and wavelength known, then:
    • Sum two waves created by reflecting from the two water surfaces.
    • The height of the summation is how bright that wavelength is.
  4. Convert the wavelength of light to coordinates in XYZ color space.
  5. Multiply the XYZ coordinates by the brightness of the wave summation.
    • If the light source brightness varies with wavelength, multiply by the relative brightness.
  6. Repeat steps 2-5 for every other wavelength of light.
  7. Find the average XYZ coordinates over all wavelengths of light.
  8. Convert the average XYZ coordinates to red, green, and blue for display.
  9. If desired, go back to step 1, and compute for a different thickness

When performed correctly, the following colors appear for delays ranging left-to-right from 0 nm to 2,000 nm. In this example, it was assumed the light source had all wavelengths with equal brightness.

Two-wave interference colors with delay between 0 nm and 2,000 nm.

The measure of success is when the calculations predict the real world. I encourage you to compare these results with images of soap bubbles. A particularly nice example is the first image in the link below, which has 0 nm thickness at the upper-left and increases in thickness toward the lower-right. Using the color bar above, it is possible to estimate the bubble thickness just by color.

Final Thoughts

This topic was written in terms of two-wave interference from a soap bubble, but polarization experts might also recognize the colors from the Michel-Lévy birefringence chart[5]. We may not often think about a polariscope as creating interference between two waves, but ultimately it is the same process.

Note: To keep this webpage accessible to the widest possible audience, the math and many other technical details have been removed. I am happy to discuss these results further, and the code for these pages is commented, so take a look or ask me a question.

References

  1. Soap bubble image copied under the Creative Commons Attribution 2.5 Generic license. Original source copied on June 13, 2022 from the file located at https://en.wikipedia.org/wiki/File:Thinfilmbubble.jpg. No modifications have been made to the original image.
  2. Mathematically, the delay is calculated using the Fresnel equations. When a reflection from soapy water occurs, the math shows there is a π phase difference between the air-to-water reflection and the water-to-air reflection. This difference remains even in the limit as the optical path length approaches zero. Unfortunately the details of these calculations are beyond the scope of this article.
  3. Andrew Stockman, Donald I. A. MacLeod, and Nancy E. Johnson, "Spectral sensitivities of the human cones," J. Opt. Soc. Am. A 10, (1993) pp. 2491-2521. https://doi.org/10.1364/JOSAA.10.002491
  4. T Smith and J Guild, "The C.I.E. colorimetric standards and their use", Transactions of the Optical Society, 33, 3, (Jan 1931), pp.73-134. https://doi.org/10.1088/1475-4878/33/3/301
  5. A. Michel-Lévy, "Les Minéraux des Roches", Librairie Polytechnique, Baudry et cie éditeurs (Paris), 1888, planche coloriée, 'Tableau des biréfringences'.