The phenomenon of soap bubble color is due to the wave nature of light and the fact that it is composed of all the colors that make up the spectrum of light visible to the human eye.
When the bubble is formed, a certain amount of water is trapped inside the film giving it stability. When observing a bubble on a sunny day, one can see that there iscolor changes on its surface , similar to rainbow colors . This variation occurs due to the reflection and refraction of light on its surface , as the thickness of the bubble varies, more or less colors are reflected. This color that we perceive on the surface of the bubbles occurs due to the interference between the light rays that are reflected and refracted in the thin film of the soap bubble. In constructive interference, the light rays are in phase and recombine forming new colors, in destructive interference, the light rays have different phases, in this way one ray of light cancels the other and for this reason we do not see any color, forming so the dark spots.