Three defensive mechanisms are typical of octopuses: ink sacs, camouflage, and autotomising limbs. Most octopuses can eject a thick blackish ink in a large cloud to aid in escaping from predators. They also have specialized skin cells both for color changing (chromatophores) and light reflection and refraction (iridophores and leucophores). They use this ability to blend into the environment to hide, communicate with other octopuses, or warn. The very poisonous Blue-ringed Octopus becomes bright yellow with blue rings when it is provoked. When under attack, some octopuses can autotomise their limbs, in a similar manner to skinks and other lizards. The crawling arm serves as a distraction to would-be predators; this ability is also used in mating. A few species, such as the Mimic Octopus have a fourth defense mechanism. They can combine their highly flexible bodies with their color changing ability to accurately mimic other, more dangerous animals such as lionfish and eels.
This demo uses the Octopus Engine! Feel free to browse/borrow through the code or just download and use the source package, which includes all the source code and PSD's for the demos!