As you lift your frame out of the solution, the soap film flows into a state of minimum energy. The soap film is in a state of minimum energy when it’s covering the least possible amount of surface area. The intricate shapes you see inside the frame represent the minimum area the soap film can cover. You may notice that a soap film will sometimes take on different shapes when you dip the frame into the solution again and again. That’s because there may be more than one way for the soap film to form a minimum surface area.
When light waves hit the soap film, they reflect and interfere with each other. This interference causes the shimmering colors you see.
White light is made of many different colors. When white light shines on the soap film, some light waves reflect from the front surface of the film and some reflect from the back surface of the film. When these two sets of reflected waves meet, they can add together, cancel each other out, or partially cancel, depending on the thickness of the film and the initial color of the light. When light waves of a particular color meet and cancel each other, that color is subtracted from white light. For example, if the red light waves cancel, then you see white light minus red light, which you perceive as blue-green light.