Some animals match their body colour to their environment. Mammals have a restricted colour pallet of white, black, brown and yellow, but fish, reptiles, birds and amphibians can produce vivid greens and reds as well. Many sea creatures get the red pigments for their colours from the corals and seaweeds they are surrounded by.
Most mammals can only see in black or white, or only two colours, with primates seeing three primary colours and birds four. Insects can see the ultraviolet part of the spectrum and many snakes can sense infrared. Tigers are well camouflaged in the jungle because most of the animals they hunt are green/orange colour blind.
One of the first parts of the brain to evolve was there to recognise the edges of things and most animals still have a dedicated part of their brain for outline recognition. Lots of camouflage uses contrasting patterns of light and dark or different colours to break up outlines into smaller shapes to trick this outline recognition system. In an environment where there are not many hiding places, this system is vital. Think of a killer whale, the orca, with its black and white patches breaking up its outline, hiding its shape. Zebras use the same technique, but as a herd, so together their stripes blend into a confusing mass that make it hard for hungry lions and cheetahs to separate one out to target for a kill.
The Alaskan snowshoe hare has standard rabbit brown fur during spring and summer that would make it stand out in a white snowy environment, so it moults to a white coat in winter, with black tips on its ears.
It is commonly thought that chameleons are masters of disguise, changing their colour to blend in with their environment, but in fact chameleons control their colours with their hormones to signal their mood to other chameleons.
The cephalopods are the masters of a quick change – particularly cuttlefish and octopus. They have skin that is packed with specialised cells called chromatophores that change the colour or reflectivity of their skin. Every chromatophore has its own nerve fibre and activating muscle, connected to a part of the brain dedicated to coordinating the complex patterns.
Although the cells only contain a limited palette of red, yellow and brown pigments, cuttlefish can create almost any colour by combining different layers of coloured and reflecting cells. The cuttlefish can change its entire skin colour in less than a second with this system!
As well as smell and sight, movement can be used for camouflage. This is known as procrypsis. Praying mantises, chameleons and leaf insects move with a rocking motion mimicking the swaying of branches in the wind and some Pacific octopuses move along the seabed by timing their movement to match the shadows cast by the sunlight through the moving waves.