Chameleons are one of the five coolest species in the world. That's a fact.*
They're wicked awesome for a number of reasons: their funny, little two-toed feet, their uber-mobile eye cups, their super curly tails and their other exciting physical embellishments. What's probably best about them, though, is their polychromatic flare. But all those changing colors, unlike what many people believe, usually don't have a thing to do with blending into their surroundings. It hinges on the particular species, of course, but they're usually pretty well camouflaged to begin with. If they need to visually merge into the background, they can just stick with their normal coloration.
Instead, chameleon color-changing is typically triggered by physical, physiological and emotional changes. If they're feeling fussy, say angry or afraid or combative, they'll change colors using their chromatophores. They'll also change colors as a way of communicating in various manners (insert romantic music here) and to pick a fight with a competitor. Light and temperature play a big part, too, in how these little fancy pantses look.
*Chameleons' rank as one of the five coolest species in the world is not, in fact, a fact. Although it is very, very likely.