Opalescent inshore squid (Doryteuthis opalescens) are some of the most sophisticated shapeshifters on Earth. These curious cephalopods are cloaked in a special skin that can be precisely tuned to a kaleidoscope of colors.

Scientists have long been fascinated by this squid's remarkable camouflage and communication. New research has brought us even closer to figuring out how they can pull off such an eclectic wardrobe that allows them to hunt near the brightness of the shore, slip by predators unseen, or even evade aggressive suitors by flashing a pair of fake testes.

Previous studies have shown the opalescent squid possesses a complex molecular machine within its skin: a thin film of stacked cells capable of expanding and contracting like an accordion to reflect the entire visible spectrum of light, from red and orange to yellow and green, to blue and violet.

These tiny grooves are sort of like what you see on a compact disc, researchers say, reflecting a rainbow of colors as you tilt it under the light. But just like a CD, this skin also needs something to amplify its colorful noise.

When researchers tried to genetically engineer this squid's skin, they noticed something was slightly off.

The 'motor' that tunes the grooves within the squid's skin is driven by reflectin proteins, which respond to different neural signals and control reflective pigment cells.

Synthetic materials containing reflectin proteins have shown an iridescent look similar to what we see in squid, but these materials could not flicker or shimmer in the same way.

Something was clearly missing, and recent studies within living squid and genetic engineering have shone a light on the mystery. As it turns out, reflectin proteins can only shine bright if they are enclosed in a reflective membrane envelope.

This envelope is what encloses the accordion-like structure, and peering underneath, you can begin to see how it works.

Reflectin proteins are usually repelled by one another, but a neuronal signal from the squid's brain can turn off that positive charge, allowing the proteins to clump closely together.

When this happens, it triggers the overlying membrane to push water out of the cell, shrinking the thickness and spacing of the grooves, which split light into various colors.

This collapse between the grooves also increases the concentration of reflectin, which allows the light to reflect even brighter.

Thus, the authors explain, this complex process "dynamically [tunes] the color while simultaneously increasing the intensity of the reflected light", and this is what allows the opalescent squid to shimmer and flicker, sometimes with color and sometimes not.

Cells within the squid's skin, which reflect only white light, also appear to be driven by this same molecular mechanism. In fact, the authors think this is what allows the squid to imitate the glittering or dappled light of the sun on waves.

"Evolution has so exquisitely optimized not only the color tuning, but the tuning of the brightness using the same material, the same protein, and the same mechanism," says biochemist Daniel Morse from the University of California, Santa Barbara.

Engineers have been trying for years to mimic the opalescent squid's remarkable skin but have never quite gotten there. The new research, which was supported by the United States Army Research Office, has helped us figure out where we were going wrong.

On their own, thin films of reflectin cannot deliver the full power of light control that we see in squid, the authors conclude, because it seems we lack that coupled amplifier.

"Without that membrane surrounding the reflectins, there's no change in the brightness for these artificial thin-films," says Morse.

"If we want to capture the power of the biological, we have to include some kind of membrane-like enclosure to allow reversible tuning of the brightness."

The study was published in Applied Physics Letters.