In general, the presence of different colors of light in the random wavelengths of soap foam. Soap foam is actually a collection of innumerable bubbles of various sizes of soap. When air is trapped between soapy water particles , it forms an almost spherical bubble. As the surface tension of soapy water is low, the walls of air-filled water spheres expand or expand easily . The thickness of the wall will show a slight hint of color from its surface, but it will look very light or pale. But when sunlight or artificial light falls on soap bubbles , the sum of numerous bubbles, light waves are scattered from those bubbles. The color of the scattered light depends on the size of the bubble. Just as the smaller sizes are responsible for the purple-bluish light , so the larger the size of the bubble, the longer the wavelength of the scattered light will shift. That is, from green to yellow , from red to red. Their combined appearance makes the foam white because almost all colors are present in the light at these random wavelengths.