When I went out to pick raspberries this morning, I found something much more delightful than a bunch of mating Japanese beetles (the scourge of the berry patch!) — a couple of 1-inch Gray Treefrogs hiding in plain sight on the green leaves of the raspberries.
Although this species is named the Gray Treefrog, because they are quite gray with a dark blotchy pattern sometimes, in bright sunlight on a green background, they are well camouflaged as they match their background. In fact, this frog even matches the particular shade of green of the raspberry leaf on which it rests.
Frog skin contains a stack of color-producing cells called chromatophores, and many frog species like the Gray Treefrog, have 3 sets of them: a deep layer called melanophores that contain a black/brown pigment called melanin, an intermediate layer called iridophores that lack pigment but contain particles that can reflect blue light, and an upper (most superficial) layer called xanthophores that contain yellow pigment.
Now, it should be more obvious how a Gray Treefrog can transform quickly from its gray color that is produced by the dispersion of deep-lying melanin pigment to a bright green color, produced by the interaction of blue-reflected light from the iridophores passing through the yellow pigment of the xanthiphores (i.e., blue plus yellow equals green to our eyes).
The dispersion of pigment in frog skin is controlled by nerves and hormones, which act on the chromatophores to aggregate (condense) or disperse pigment. Physiologically, in a matter of seconds, when melanophores aggregate their pigment to uncover the iridophores and xanthophores disperse their pigment, a gray frog turns green!