Color, one of the most beautiful aspects of bubbles, also provides us with an extremely accurate tool for measuring the thickness of the soap film.
Light waves, like ocean waves, have peaks and valleys (crests and troughs). Red light has the longest wavelength and violet the shortest.
All waves, including light, have a curious property: if two waves combine, the waves can meet each other crest-to-crest, adding up and reinforcing the effect of each other, or they can meet crest-to-trough, cancelling each other out so that they have no effect. When they meet crest-to-trough, for every "up" vibration in one wave, there is a corresponding "down" vibration in the other wave. This combination of equal ups and downs causes complete cancellation or interference. Interference is responsible for the pearly luster of an abalone shell, the beautiful colors in some bird feathers and insect wings, and the flowing patches of color in an oil slick on the street after a rain shower - and for the color of bubbles.
White light is made up of all colors, all wavelengths. If one of these colors is subtracted from white light (by interference, for instance) we see the complementary color. For example, if blue light is subtracted from white light, we see yellow. The skin of a bubble glistens with the complementary colors produced by interference. If we were to look at a highly magnified portion of a soap bubble membrane, we would notice that light reflects off both the front (outside) and rear (inside) surfaces of the bubble, but the ray of light that reflects off the inside surface travels a longer distance than the ray which reflects from the outside surface. When the rays recombine they can get "out of step" with each other and interfere. Given a certain thickness of the bubble wall, a certain wavelength will be cancelled and its complementary color will be seen. Long wavelengths (red) need a thicker bubble wall to get out of step than short wavelengths (violet). When red is cancelled, it leaves a blue-green reflection. As the bubble thins, yellow is cancelled out, leaving blue; then green is cancelled, leaving magenta; and finally blue is cancelled, leaving yellow. Eventually the bubble becomes so thin that cancellation occurs for all wavelengths and the bubble appears black against a black background.
This surprising complete cancellation is due to the different way light reflects from the two surfaces. When light reflects from the outside surface of the bubble (an air-to-water surface) the direction of vibration of the wave is reversed - all "up" vibrations are turned into "down" vibrations and vice versa. (The same thing happens if you send a vibration along a rope tied to a wall; the reflected pulse is upside-down after reflection from the wall. ) When light reflects from the inside surface of the bubble (a water-to-air surface) the direction of the vibration is not changed. If the skin of the bubble is very thin, much shorter than the wavelength of visible light, then the two reflected rays of light will always meet crest-to-trough and destructively interfere. There will be no visible reflection, and the bubble looks black. When you see this happening at the top of a soap bubble you know the bubble is only about one millionth of an inch thick and will soon pop.
If you let a bubble hang from a bubble wand for awhile, the interference colors begin forming horizontal stripes - because the bubble film is thicker at the bottom than at the top, forming a wedge shape. As the bubble drains, the wedge of bubble solution gets thinner and thinner. The black film which then appears at the top of the bubble is a harbinger of an upcoming disaster. The bubble is now so thin only a few moments remain until. . .POP!