This 2015 video says about itself:
Octopuses and cuttlefish are masters of underwater camouflage, blending in seamlessly against a rock or coral. But squid have to hide in the open ocean, mimicking the subtle interplay of light, water, and waves. How do they do it?
From the University of Queensland in Australia:
MRI-based mapping of the squid brain
January 28, 2020
We are closer to understanding the incredible ability of squid to instantly camouflage themselves, thanks to research from The University of Queensland.
Dr Wen-Sung Chung and Professor Justin Marshall, from UQ’s Queensland Brain Institute, completed the first MRI-based mapping of the squid brain in 50 years to develop an atlas of neural connections.
“This the first time modern technology has been used to explore the brain of this amazing animal, and we proposed 145 new connections and pathways, more than 60 per cent of which are linked to the vision and motor systems,” Dr Chung said.
“The modern cephalopods, a group including octopus, cuttlefish and squid, have famously complex brains, approaching that of a dog and surpassing mice and rats, at least in neuronal number.
“For example, some cephalopods have more than 500 million neurons, compared to 200 million for a rat and 20,000 for a normal mollusc.”
Some examples of complex cephalopod behaviour include the ability to camouflage themselves despite being colourblind, count, recognise patterns, problem solve and communicate using a variety of signals.
“We can see that a lot of neural circuits are dedicated to camouflage and visual communication. Giving the squid a unique ability to evade predators, hunt and conspecific communicate with dynamic colour changes.”
Dr Chung said the study also supported emerging hypotheses on convergent evolution — when organisms independently evolve similar traits — of cephalopod nervous systems with parts of the vertebrate central nervous system.
“The similarity with the better-studied vertebrate nervous system allows us to make new predictions about the cephalopod nervous system at the behavioural level,” he said.
“For example, this study proposes several new networks of neurons in charge of visually-guided behaviours such as locomotion and countershading camouflage — when squid display different colours on the top and bottom of their bodies to blend into the background whether they are being viewed from above or below.”
The team’s ongoing project involves understanding why different cephalopod species have evolved different subdivisions of the brain.
“Our findings will hopefully provide evidence to help us understand why these fascinating creatures display such diverse behaviour and very different interactions.”