The octopus was almost invisible until the diver was within grabbing range. Fortunately, the octopus preferred to swim away instead of fighting. It can change color so quickly and so precisely that you'd never see it until you were almost touching it. It's the ninja of the sea.
Aren't you envious? Well, maybe you can have this ability in the future. Researchers at the University of Houston and University of Illinois at Urbana–Champaign have developed a fabric that changes color when exposed to light. The design is similar to the properties of octopus skin. Loren Grush explains in Popular Science:
The design is loosely based on the skins of cephalopods, which are comprised of special pigment cells called chromatophores. A group of muscles controls the size of these chromatopheres, changing their colors and creating different patterns. It is also thought that light-sensing molecules called opsins help cephalopods use their skin to “see” light, triggering their complex adaptations.
The new artificial material, detailed in the journal PNAS, mimics this biological process in a way. The top layer of the sheet is made up of heat-sensitive dye, which is black at room temperature and colorless at 116 degrees Fahrenheit (similar to the color-changing properties of the chromatophores). A second layer underneath is made up of numerous reflective silver tiles, creating the white background. And the third layer contains a silicon circuit, responsible for controlling the temperature of the sheet.
The fourth and final layer contains an array of light-sensing photodetectors that work kind of like the cephalopod’s opsins. These detectors sense when and where the light is being shined and tell the circuit to heat up in the right spot. This action causes the top layer to go colorless, and, in turn, the white background shines through.
Here's the photoreactive fabric in action.