...[I]f I had to have a superhero on my team, I’d want an octopus on the contract. There’s a sequence in the film, My Octopus Teacher, where the animal covers herself in broken and abandoned shells to escape a shark attack. After that, she catapults herself from inside the shark’s jaws onto its back, riding the confused creature until she can make a smooth escape.

The knowing cephalopod, through her growing trust in the film-maker, uses his presence to hunt prey. Against the backdrop of an astonishingly shallow kelp forest, she displays memory retention, curiosity and a rare connection with the film-maker Craig Foster, and in his beautiful words, “the incredible creativity to deceive”.

You really can’t fit them into a box (literally, too, as chances are that they’d escape); they appear to be misfits in their own extended families as well, which is another relatable quality. They belong to the Mollusca class Cephalopoda. But they don’t look like their cousins at all.

Other molluscs include sea snails, sea slugs, bivalves – most are shelled invertebrates with a dorsal foot. Cephalopods are all arms, and can be as tiny as 1 centimetre and as large at 30 feet. Some of them have brains the size of a walnut, which is large for an invertebrate.

For example, in a master stroke of problem-solving abilities, cuttlefish have the incredible ability to cross-dress in a crowded, competitive mating ritual.

Usually, a bunch of cuttlefish males will vie for a single female’s attention, not unlike a swayamvar situation or an episode of The Bachelorette. In this display of macho exhibitionism, a smaller male cuttlefish might miss out. These smart guys will camouflage themselves to appear like a female in order to sneak past the crowd full of burly males and get an audience with the female fish. It’s like a foot in the door that’s otherwise crowded with competition.

In the documentary called Kings of Camouflage, Jesse Purdy, a comparative psychologist, said of cuttlefish, “It’s as close perhaps we’re going to get to studying an animal on another planet.”

Writer, director, Gisela Kaufmann, Kings of Camouflage, 3 April 2007, documentary: 2006 Nova/ PBS documentary

It makes sense for these molluscs to have added protection in the form of a higher cognition; they don’t have a shell covering them, and pretty much everything feeds on cephalopods, including humans. But how did cephalopods manage to secure their own invisibility cloak?

Cephalopods fire from multiple cylinders to achieve this in varying degrees from species to species. There are four main catalysts – chromatophores, iridophores, papillae and leucophores.

Stay with me – this gets very good, very fast.

First up: chromatophores. These are organs on their bodies that contain pigment sacs, which have red, yellow and brown pigment granules. These sacs have a network of radial muscles, meaning muscles arranged in a circle radiating outwards. These are connected to the brain by a nerve.

When the cephalopod wants to change colour, the brain carries an electrical impulse through the nerve to the muscles that expand outwards, pulling open the sacs to display the colours on the skin.

Why these three colours? Because these are the colours the light reflects at the depths they live in (the rest is absorbed before it reaches those depths).

On a walk in Juhu, an octopus expertly crawled over from pool to pool and all but galloped towards the approaching tide. On the way, it began flashing brown and white, its skin appearing to dance with colour as it dived into the shallows. As we saw it zoom away using jet propulsion for speed, its colour had changed entirely into brown.

I was gobsmacked. These were the chromatophores at work. You’ll see evidence of these even on dead animals that have been stranded on the shore.

Well, what about other colours? Cue the iridophores.

Think of a second level of skin that has thin stacks of cells. These can reflect light back at different wavelengths. Let me make this easier with a few examples. It’s using the same properties that we’ve seen in hologram stickers, or rainbows on puddles of oil. You move your head and you see a different colour.

The sticker isn’t doing anything but reflecting light – it’s your movement that’s changing the appearance of the colour. This property of holograms, oil and other such surfaces is called “iridescence”.

While the chromatophores actively achieve colour changes in the animal by using their own pigment granules, iridophores are merely reflecting light back – depending on the angle you’re looking at the animal from.

Now, you’d think that this would be enough for the cephalopod. It’s already so much more than the rest of us have access to. Nope. It wonders, what about predators (or fleeing prey) that might still find me by my outline? That wouldn’t do at all, would it?

Enter papillae.

Papillae are sections of the skin that can be deformed to make a texture bumpy. Even humans possess them (goosebumps) but cannot use them in the manner that cephalopods can. For instance, the use of these cells is how an octopus can wrap itself over a rock and appear jagged or how a squid or cuttlefish can imitate the look of a coral reef by growing miniature towers on its skin. It actually matches the texture of the substrate it chooses.

Finally, the leucophores: According to a paper, published in Nature, cuttlefish and octopuses possess an additional type of reflector cell called a leucophore. They are cells that scatter full spectrum light so that they appear white in a similar way that a polar bear’s fur appears white. Leucophores will also reflect any filtered light shown on them, for instance, they will reflect green light if green is presented to them.

Simply put, these help the animal blend into the background. If the water appears blue at a certain depth, the octopuses and cuttlefish can appear blue; if the water appears green, they appear green, and so on and so forth.

All these powers work together, or separately as needed, to create the most sophisticated camouflage known to us.

What is now such an obvious concept – using colour and light and shadow to hide—was not always so.

In the 1980s, an American artist and nature enthusiast called Abbott Thayer put forth a then-radical idea: concealing colouration. He argued that colouration plays a role in protection and predation in nature, meaning animals actively use colour to navigate, attack and defend themselves.

The idea of camouflage was obviously around long before then; warriors used headdresses and warpaint long before Thayer cited them as examples of using disruptive camouflage. This means that strong, random patterns of colour flatten and break up outlines, rendering the person or animal or thing almost invisible.

However, no one before him had put together this kind of documented research on the subject. He firmly believed that only an artist could have made these discoveries, considering their intense understanding of colour. He showed, through carefully made artwork, how “the upper areas of animals tend to be darker than their shadowed undersides. Thus, the overall tone is equalised.” This renders the animal difficult to spot.

It is possible that his research on disruptive patterns and countershading played a role in modern camouflage used in the military, in uniforms and ships. He was considered a genius, although some of his theories, which admittedly stretched too far, were also criticised, most notably by Theodore Roosevelt, who went on to serve as the twenty-sixth President of the United States. His son, Gerald Thayer, published a summary of his discoveries as a book called Concealing Coloration in the Animal Kingdom.

Superpowers on the Shore

Excerpted with permission from Superpowers on the Shore, Sejal Mehta, Penguin Viking.