There is a gland approximately in the middle of the brain of humans and in lesser animals called the pineal body. Scientists have always been curious about this gland because they don’t know exactly what it does, if anything, in humans, yet its location would seem to make it a very important organ.
In frogs other amphibians, and many reptiles, because they are so small and because part of their skulls are thin, light actually reaches this gland. Evidently, the pineal body triggers the chemical changes that allow some of these critters to change color to match their environment.
In studies with rats, it has been determined that those kept in light tend to breed more, while rats in darkness breed less. Evidently the pineal body is behind this, receiving its information from the optic nerves, which enter the brain at the same location.