Scientists thought they knew how chameleons change colors, but a new study reveals an entirely different explanation. The reptiles are now believed to be using photonic nanocrystals.

The findings were published in the journal Nature Communications. Researchers at the University of Geneva focused on the panther chameleon of Madagascar and found that it actually uses the nanocrystals to manipulate light to change the color of its skin in just minutes.

Scientists have long believed that chameleons change colors by moving pigments around in chromatophore cells, notes The Los Angeles Times. However, the researchers looked into the chameleon’s iridophores, which are cells that can manipulate color by using the nanoscale geometry to make light wavelengths bend or bounce in different ways.

It turns out that the panther chameleon has two layers of skin with iridophores. The first has tiny nanocrystals with spaces in between each crystal. When a chameleon is excited, the crystals are far apart, but when the chameleon is in a resting state, they are close together. Creating that space by manipulating the crystals changes the light wavelengths reflected off the skin. When they are far apart, they reflect longer wavelengths, which is why they their skin turns red (as red has longer wavelengths) when they are excited.

The second later with less-organized crystals can reflect near-infrared light. That helps the chameleon keep cool on hot environments.

“Chameleons invented something completely new in evolution,” Michel Milinkovitch, a biophysicist and coauthor of the study, told The BBC. “They split the iridophores into two layers, one that is specialised for colour change... and one to reduce the amount of energy absorbed by the animal. That's an amazing toolkit that allows them to choose between being hidden or displaying very spectacular colours for communication - and on top of that they have this ability to control their temperature because of the deep iridophores.”

screenshot from EpiPhysX science channel YouTube video