Why oil on water looks like a rainbow
This is due to an effect called interference. Light is an electromagnetic wave (actually, its made up of particles at the same time, but that’s not the point here - it’s called wave-particle dualism). Colors are merely waves with different wavelengths. There are also many wavelengths we cannot see.
The oil spreads out into a thin film. When a ray of light falls onto this film, it splits up. There is firstly the part reflected on the border air-oil. Then there is the part that got refracted at the air-oil border but reflected at the oil-water border and refracted yet again at the oil-air border, and so on. There are actually infinitely many rays, but for our purposes those two traveling from the puddle with the oil on it towards your eyes (or the camera, whatever) will be enough.
Ray #2 had a tiny bit farther to travel than ray #1, namely twice the thickness of the oil film, as seen at the angle of the puddle towards you. This amount is incidentally in the same order of magnitude as the wavelength of visible light (which is between 400 (violet) and 800 (red) nm), and each time it’s a little different depending on what point of the puddle you are looking at. Sunlight contains all colors (seen in the famous rainbow, or with a prisma), and for each angle there’s one color which interferes constructively, while the others do less so.
Therefore each point on the puddle seems to have a certain color. And it shifts when you move your head. (Image)I always wondered why this happened. There’s a longer description at the link.
