Chameleons have specialized cells, chromatophores, which contain pigments in their cytoplasm, in three layers below their transparent outer skin:
- The chromatophores in the upper layer, called xanthophores and erythrophores, contain yellow and red pigments, respectively.
- Below the chromatophores is a second layer of chromatophores called iridophores or guanophores; these contain guanine, appearing blue or white.
- The deepest layer of chromatophores, called melanophores, contain the dark pigment melanin, which controls how much light is reflected.
Dispersion of the pigment granules in the chromatophores sets the intensity of each color. When the pigment is equally distributed in a chromatophore, the whole cell is intensively colored. When the pigment is located only in the center of the cell, the cell appears mainly transparent. Chromatophores can rapidly relocate their particles of pigment, thereby influencing the animal's color.
Active camouflage is present in several groups of animals including cephalopod molluscs, fish, and reptiles.
There are two mechanisms of active camouflage in animals: counterillumination camouflage, and color change.
Counterillumination camouflage is the production of light to blend in against a lit background. In the sea, light comes down from the
surface, so when marine animals are seen from below, they appear darker than the background. Some species of cephalopod, such as Abralia veranyi and Watasenia scintillans, produce light in photophores on their undersides to match the background. Bioluminescence is common among marine animals, so counterillumination camouflage may
be widespread, though light has other functions, including attracting prey and signalling.
Color change permits camouflage against different backgrounds. Many cephalopods including octopuses, cuttlefish, and squids, and some terrestrial reptiles including chameleons and anoles can rapidly change color and pattern, though the major reasons for this include signalling, not only camouflage. Active camouflage is also used by many bottom-living flatfish such as plaice, sole, and flounder that actively copy the patterns and colors of the seafloor below them. For example, the tropical flounder Bothus ocellatus can match its pattern to "a wide range of background textures" in 2–8 seconds.