Mixing paint with shaving foam

Did you notice that the colors in the foam did not fade but when they touched the water they did? Why does this happen?


Since water and shaving foam have different densities, when we put the shaving foam on the water, a barrier is created between them.


When the drops of paint or dye manage to cross the foam barrier (since these drops weigh more than the foam) and reach the water, they dissolve to form these waterfalls of beautiful colors.