When you create lather from a piece of colored soap, why does it produce a white foam? — CLV, Brasil
The foam consists of tiny air bubbles surrounded by very thin films of soap and water. When light enters the foam, it experiences partial reflections from every film surface it enters or exits. That is because light undergoes a partial reflection whenever it changes speed (hence the reflections from windows) and the speed of light in soapy water is about 30% less than the speed of light in air. Although only about 4% of the light reflects at each entry or exit surface, the foam contains so many films that very little light makes it through unscathed. Instead, virtually all of the light reflects from film surfaces and often does so repeatedly. Since the surfaces are curved, there is no one special direction for the reflections and the reflected light is scattered everywhere. And while an individual soap film may exhibit colors because of interference between reflections from its two surfaces, these interference effects average away to nothing in the dense foam. Overall, the foam appears white—it scatters light evenly, without any preference for a particular color or direction. White reflections appear whenever light encounters a dense collection of unoriented transparent particles (e.g. sugar, salt, clouds, sand, and the white pigment particles in paint).
As for the fact that even colored soaps create only white foam, that’s related to the amount of dye in the soaps. It doesn’t take much dye to give bulk soap its color. Since light often travels deep into a solid or liquid soap before reflecting back to our eyes, even a modest amount of dye will selectively absorb enough light to color the reflection. But the foam reflects light so effectively with so little soap that the light doesn’t encounter much dye before leaving the lather. The reflection remains white. To produce a colored foam, you would have to add so much dye to the soap that you’d probably end up with colored hands as well.