Why does a clear soap bubble show rainbow colours?
Blow a soap bubble into daylight and watch it turn. Coloured bands slide across a film you can see through. Even two nearby patches can look completely different. What changes from one patch to the next?

Will a thinner and a thicker patch reflect the same colour?
Imagine two patches on the same soap bubble. The same white light shines straight onto both. The only difference is how thick the soap film is.
Side views of the film, enlarged to show the difference. A nanometre (nm) is a billionth of a metre.
What's really going on?
Light bounces off both sides of the film
Some light reflects from the outer surface. Some goes into the film and reflects from the inner surface before coming back out. The two reflected waves then overlap. One travels farther than the other, and one flips as it reflects.
The thickness changes which colours stand out
When the peaks of two reflected waves line up, they make a stronger reflection. When the peak of one lines up with the trough of the other, they weaken each other. This is called interference. Red and blue light have different wavelengths, so the same thickness can make one stand out while weakening the other.
The colours move as the film changes
The film can thin unevenly as liquid drains and evaporates. Different patches then strengthen different colours, and tilting the bubble changes the angle at which you see them. A very thin patch can look dark in reflected light because the two reflections nearly cancel across the visible spectrum.
Why might the top of a bubble look dark just before it pops?
Reveal the explanation
Liquid has drained away from the top and the film can become extremely thin there. The reflected waves then nearly cancel for many visible colours, so little light returns to your eyes.