
Scientific explanation: The rainbow candy experiment works based on the principle of diffusion. When warm water comes into contact with the candy, the sugar and food coloring in the candy begin to dissolve and diffuse into the water. Each color from the candy will create a distinct color range because they do not mix easily.