Chameleons actually don’t change their colors to match their surroundings. They change colors in order to communicate. They flash an array of patterns and shades mainly to show their moods and intentions, much as we humans use our facial expressions.
We humans mostly have control over whether we look angry or happy. Chameleons, on the other hand, wear their hearts on their sleeves. A chameleon’s color at any given time is based on complex interactions between its hormones and pigment cells. This hormonal reaction can be triggered by a number of factors, such as sickness or the presence of a competitor.
Male chameleons, for example, display their color signals either as war paint to scare off a rival, or as a bouquet of flowers, to court a mate. Females, on the other hand, have their own distinctive palette to show whether or not they’re available.
When a chameleon changes color, it’s likely to become more visible, not less. Its transformation isn’t so much a camouflage as a coded message.
Chameleons do have some tricks to hide within their environments, but they don’t involve color. Their bodies are just about all lung, so they can squeeze themselves thin and hide behind small sticks.