Thanks to frequent childhood visits to a family farm, I've had lots of encounters with these amazing critters and I've seen them change color to blend in with their environment with my own eyes. Not particularly good evidence, I hear you say. Agreed, so I spent 2 minutes on Wikipedia, followed a link, and found this New Scientist piece, about this study in Biology Letters. And guess what? At least one species of chameleon, Smith's dwarf chameleon (which, incidentally, is South African), does change color to camouflage itself from predators. The paper, "Predator-specific camouflage in chameleons" by Stuart-Fox et. al., demonstrated in several behavioral trials that these chameleons engage in background matching when presented with model predators. In other words, these guys do their best to blend in with their environment when they encounter things that want to eat them. (You can see a clear example of a chameleon matching its background in this YouTube clip [Note: James informs me in the comments that this might be fake]).
So why do people think chameleon camouflage is a myth? It seems other research (also by Stuart-Fox) that concluded color changing evolved for social signalling has been misinterpreted. The conclusion of this second paper was: "our results suggest that selection for conspicuous social signals drives the evolution of colour change in this system, supporting the view that transitory display traits should be under strong selection for signal detectability." In other words, the primary evolutionary 'function' of color changing in chameleons seems to be social signalling. But it does not follow from this that chameleons cannot also use color changing for crypsis -- the ability may have evolved for social signalling, but nothing stops it from being exapted for camouflage. It is such an obvious evolutionary trick that I'm surprised anyone interpreted Stuart-Fox et. al. second paper in this way. If you already have a visual system (to detect background color), you can already change color, you suffer predation and camouflage thus increases fitness, we should positively expect exaptation for crypsis.
As I also pointed out on my fox domistication piece, I'm not a biologist so you should be especially skeptical of my opinions on this (though, I managed to convince biologist Richard Glor over at Dechronization that my interpretation is right). But still... At least some chameleons change their color to blend in with their environment. Obviously.
UPDATE: I emailed Stuart-Fox and asked whether my take is correct. Here is the reply in part (my emphasis):
Yes, your interpretation is correct. Colour change in chameleons serves multiple current functions including camouflage (background matching), thermoregulation and communication (courtship and male-male contests). But we need to distinguish current functions from the selective pressures driving the evolution of the abiltiy to change colours. Some species can change colours much more than others - the question I was trying to answer is why such variation? And it seems that sexual selection for communication (signalling) is the most important selective pressure because the species that change colour the most have the most conspicuous colour patterns that they use to communicate.---------------------
Stuart-Fox D, Moussalli A, & Whiting MJ (2008). Predator-specific camouflage in chameleons. Biology letters, 4 (4), 326-9 PMID: 18492645
Stuart-Fox D, & Moussalli A (2008). Selection for social signalling drives the evolution of chameleon colour change. PLoS biology, 6 (1) PMID: 18232740