Scientists said they uncovered the mechanism of the feat, and that the results of their investigation astounded them.

Rather than use pigments to switch colour, nanocrystals in the lizards' skin are tuned to alter the reflection of light, they found.

"We were surprised," Michel Milinkovitch, a biologist at the University of Geneva said.

"It was thought they were changing colour through pigments. The real mechanism is totally different and involves a physical process," he added.

Colour-switching in chameleons is the preserve of males. They use it to make themselves more flamboyant to attract mates and frighten off challengers, or duller to evade predators.

The mature panther chameleon used in the study, for example, can change the background colour of its skin from green to yellow or orange, while blue patches turn whitish and then back again.

In most other colour-changing animals, the pigment melanin alters a colour's brightness by dispersing or concentrating within cells called melanophores, thus changing colour intensity but not hue.

This process had long been thought to explain chameleons' colour change as well, the team said. But that theory turned out to be false.

Skin analysis revealed that the change is regulated by transparent nano-objects called photonic crystals found in a layer of cells dubbed iridophores, which lie just below thechameleon's pigment cells.

Iridophores are also found in other reptiles and amphibians like frogs, giving them the green and blue colours rarely found in other vertebrates.

In chameleons, however, nanocrystal lattices within the iridophores can be "tuned" to change the way light is reflected, the university said in a statement.