Here is a soft robot that changes it color in real-time to match its background. This chameleon robot was developed by a team of researchers at Seoul National University. A liquid ink that changes color when exposed to heat was used to pull this off.
As heat is applied, particles in the ink form helical structures that reflect light in specific wavelengths. Any color can be displayed with this approach. A color sensor was used to detect background color.