To create dynamic textures in a flexible material, the researchers combined a patterning technique called electron-beam lithography, which is typically used in advanced semiconductor manufacturing, with a polymer film that swells as it absorbs water. By firing a beam of electrons at the film, they were able to adjust how much certain areas of the material would swell, creating detailed patterns that only revealed themselves when the film was wet.
To my reading it sounds like the color change is brought about by introducing raised microstructures on the material? Which... I'm not quire sure I understand how that can work, but that's fascinating if I'm understanding it correctly. I would have expected the shapes to be too indistinct to be useful in producing that effect.