A typical soap contains : a surfactant (cleaning agent), a dye (to create colour), a perfume (for aroma) & other additives to maintain the integrity of the soap in solid form as well as moisturizing agents so that they are gentle on the skin. During formation of bubbles, it is the surfactant with its organic chain and ionic heads that wrap around water molecules when agitated in the presence of air to create the soap suds. So, when these ionic heads get preferentially attracted to water (which is ionic) they detach from the dye molecules in the soap & there are very few dye particles in the thin film of the bubble. The soap bubbles reflect light of all wavelengths resulting in a white appearance. If the bubble is large enough & light is incident at a particular angle with the soap film having a high refractive index, you can observe dispersion of white light on the surface of the bubble, with the typical rainbow colours.