We demonstrate the chemical and optical control of the self-sustaining peristaltic motion of a structural colored porous hydrogel.