From Rebirth of the Night Wiki

The Chameleon is a passive mob added by Primitive Mobs. It spawns in daylight in Forest, Jungles or similar biomes.

Chameleons, like most passive animals, wander around and flee when hit. Chameleons take the color of the block they're standing on, making them hard to spot. When killed they drop 0-2 Camouflage Dye and have a chance of dropping a Spider Eye

They can be bred with Fermented Spider Eyes and tamed with Melon Slices. Tamed Chameleons have their health increased to 20 (10Heart.png), become immune to suffocation, drowning and fall damage, and can be healed by being fed Spider Eyes. They can also be told to sit with a right click, making them stand still instead of following their owner until right clicked again.