A bubble is made of transparent water enclosing transparent air. However, the soap film is as thin as the visible light wavelength, resulting in optical interference. This creates iridescence which, together with the bubbles spherical shape and fragility, contributes to its magical effect on children and adults alike. Each colour is the result of varying thicknesses of soap bubble film. Tom Noddy (who featured in the second episode of Marcus du Sautoys The Code) gave the analogy of looking at a contour map of the bubbles' surface. However, it has become a challenge to produce artificially coloured bubbles.
Byron, Melody & Enoch Swetland invented a patented non-toxic bubble (Tekno Bubbles) that glow under UV lighting. These bubbles look like ordinary high quality "clear" bubbles under normal lighting, but glow when exposed to true UV light. The brighter the UV lighting, the brighter they glow. The family sold them worldwide, but has since sold their company.
Adding coloured dye to bubble mixtures fails to produce coloured bubbles, because the dye attaches to the water molecules as opposed to the surfactant. Therefore, a colourless bubble forms with the dye falling to a point at the base. Dye chemist Dr. Ram Sabnis has developed a lactone dye that sticks to the surfactants, enabling brightly coloured bubbles to be formed. Crystal violet lactone is an example. Another man named Tim Kehoe invented a coloured bubble which loses its colour when exposed to pressure or oxygen, which he is now marketing online as Zubbles, which are non-toxic and non-staining. In 2010, Japanese astronaut Naoko Yamazaki demonstrated that it is possible to create coloured bubbles in microgravity. The reason is that the water molecules are spread evenly around the bubble in the low-gravity environment.