Like most lizards, bearded dragons (pogona vitticeps) are capable of a certain degree of color change to communicate with other lizards (the bearded dragon’s beard will turn black for a display of social dominance, for example) as well as to aid in thermoregulation (such as a bearded dragon turning dark to better absorb heat from the sun).
In the past few years, scientists have been studying how bearded dragons use color change to better match their surroundings and for camouflage in response to seeing a potential predator.
Turns out chameleons aren’t the only lizards that can change color to blend in. I’ll bet this threat response turns out to be really widespread in lizards generally.
This article link has some nice videos to better show what is happening: