Squids protect themselves with several techniques and biological mechanisms to blend in with the surrounding environment, counter oncoming threats and defend themselves in the event of an attack by a predator or rival. There are approximately 500 species of squid, and all rank high in intelligence among other invertebrate animals.
All squids possess chromatophores that are found all across their bodies. These color-changing cells allow squids to camouflage themselves with the surrounding environment. Combined with their counter-shaded bodies, with light coloring on the underside and darker coloring on top, squids can make themselves virtually invisible while hunting prey and evading predators.
Some squids possess photophores, which are cells that produce light on the squid's body and are used to attract mates, deter predators, provide camouflage and entice prey. The activation and patterning of these photophores is accomplished via a process called bioluminescence.
Ink excretion is another important defense mechanism used by squids. Adjacent to a squid's rectum is the ink sac, which the animal uses to excrete ink to confuse or otherwise disorient predators and rivals.
In addition to serving as the primary mechanism for grabbing and trapping prey, the combination of suckers and sharp hooks found on the two tentacles and eight arms of many species of squid can also function as potentially lethal defense mechanisms.