Hiding in plain sight by matching the color of your skin to the color of the background is useful for predators stalking their prey or prey trying to escape predation. It’s also useful in confusing photographers about where to aim their cameras. Case in point: I saw the bushes moving, wondered if it was a bird, thought it might be a chipmunk, but stared right at the little critter for a full minute before I figured out what it was.
Many species of fish, amphibians, and reptiles have the ability to change color and outward appearance by contracting or expanding the chromatophore (pigment-containing) cells in their skin. This chameleon-like ability can assist them in better regulating their body temperature, or as suggested, in achieving the kind of camouflage that helps them evade their predators or fool their prey. It is thought that the animals’ eyes perceive the color spectrum of their environment and send neural signals to skin chromatophores to effect the appropriate color changes.
In cases where there doesn’t seem to be a clear message about the color of the background, Gray Treefrogs are often mottled gray and green, or just remain gray, as illustrated below.