Regardless of whether the original soap/shampoo is orange, green, pink, yellow or any other color, you have surely observed that the foam or lather that forms when it’s mixed with water and rubbed vigorously is always white in color. Isn’t that a bit strange?
Why do soaps of different colors form the same white-colored foam?
Short answer: The ultra-thin layer of soap (that’s formed when it’s dissolved with water) is pretty much transparent on its own, but the foam looks white, because visible light gets scattered in multiple directions after passing through several surfaces.
To understand this better, let’s do a quick recap of an important optical phenomenon.
What is the scattering of light?
The dictionary meaning of the word ‘scatter’ is ‘to throw in various random directions’ or ‘move off quickly in different directions’. This is also pretty much what ‘scattering of light’ means in the world of optics.
We say that light has ‘scattered’ when light rays in a straight line are deflected in random directions after striking something (that ‘something’ could be as small as an air molecule). The scattering of light occurs due to irregularities in the propagation medium, particles, or in the interface between two media.
The sky appears white/grey because of the scattering of light
The sky we see above appears white/grey due to the scattering of light (a specific type of scattering called Mie scattering). You see, almost all sunlight that enters clouds gets scattered, thanks to the presence of large enough cloud droplets (~20 micrometers) that scatter all visible wavelengths rather equally, giving clouds their white/greyish appearance.
Note that scattering is different from reflection – reflection involves the deflection of the incident light ray in only one direction, whereas in scattering, you can never tell (with certainty) which direction the deflected light ray is going to move.
Why is foam white?
First off, you should know that the dyes used to impart color to soaps and shampoos are highly diluted. In other words, they only use a tiny bit of dye to color a soap. When we rub soap in water to make lather, an incredibly minuscule amount of dye goes into the formation of lather. Thus, there’s little (or almost no) color in the foam to begin with.
Scattering of light
White light, as you might recall from your high school science classes, is a combination of visible light of different wavelengths (and therefore, different colors).
The foam that you see after rubbing soap in your hands is a large collection of tiny soap bubbles. Each individual bubble is actually an extremely thin film of the soap solution. Since soap is a surfactant (meaning that it affects the surface tension of the liquid), it lowers the surface tension of water, which then causes the film to stretch. This results in an increase in the total surface area of the film (thanks to the countless bubbles), which causes the already deficient color in the film to spread out and become next to impossible to visually detect.
The foam in its entirety looks white because when light enters the soap solution, it must pass through a number of tiny soap bubbles, i.e., a number of surfaces. These countless surfaces scatter the light in different directions, which makes the foam/lather look white.
After reading all this, it should be clear that trying to find a color in soap foam is an exercise in futility.