Why does petrol create a rainbow on water?
So, when light hits the surface it reflects back. As there are multiple layers and for each and every layer light with different wave length reflects light back while some goes further in and is reflected off the surface of the water below the oil layer. As the light waves travel different distances before being reflected, the angle of reflection is also different and it therefore produces different colours. These different colours mix together producing a rainbow like appearance. This phenomenon is called thin-film interference.