Imagine you’re a male veiled chameleon (Chamaeleo calyptratus) facing down another male. As you approach your opponent, you see his yellow body stripes get brighter and begin to flash, contrasting against his blue-green belly. When you get closer, you flash the colors on your head. But this doesn’t make him back down, and the two of you end up in a fight, butting heads, shoving and biting until one of you backs off.

The chameleon’s color-changing ability is famous — so much so that it’s even i...