There are plenty of mysteries in nature that have yet to be solved, but you can mark this one off the list.

Scientific American reports that a recent study has outed the secret of how chameleons change the color of their skin.

DON’T MISS: Is iOS 8.2 killing your battery life? Try this trick

According to the report, chameleons have a layer of special cells that they can adjust based on the reflection of light off of their skin. Other animals that change color, such as squid and octopi, modify their hues with pigments in their skin cells, but lizards rely on exterior light sources.

In order to figure this out, researchers studied 13 chameleons and found two layers of iridophone cells that had the ability to reflect light.

“When the skin is in the relaxed state, the nanocrystals in the iridophore cells are very close to each other — hence, the cells specifically reflect short wavelengths, such as blue,” said study senior author Michel Milinkovitch, a professor of genetics and evolution at the University of Geneva in Switzerland.

For more on this fascinating study, be sure to head to Scientific American.