Squid are chameleons of the ocean, shifting effortlessly from hue to hue as they cross sand, coral and grass. Scientists have long studied the peculiar structures in their skin that interact with light, trying to understand how the animals change color so swiftly and with such precision.

Now, a paper published last week in Nature Communications suggests that their chromatophores, previously thought to be mainly pockets of pigment embedded in their skin, are also equipped with tiny reflectors made of proteins. These reflectors aid the squid to produce such a wide array of colors, including iridescent greens and blues, within a second of passing in front of a new background. The research reveals that by using tricks found in other parts of the animal kingdom — like shimmering butterflies and peacocks — squid are able to combine multiple approaches to produce their vivid camouflage.

The researchers studied Doryteuthis pealeii, or the longfin squid, which is found in the North Atlantic Ocean and might turn up on your plate when you order calamari.