The intuitive model of colour change is pigment: dark granules spread or clump within cells, darkening or lightening the skin. That is real, and chameleons do it. But it cannot produce the rapid swing from green to bright yellow and orange that a displaying male panther chameleon achieves in a couple of minutes.
Work from the University of Geneva, published in 2015, identified a layer of iridophore cells holding guanine nanocrystals arranged in a three-dimensional lattice. Such a lattice acts as a photonic crystal: it reflects a wavelength determined by the spacing between crystals. When the cell's state changes, the spacing widens and the reflected colour shifts toward longer wavelengths. A deeper second iridophore layer with larger, less ordered crystals reflects near-infrared and appears to help with heat management.
The common belief that chameleons change colour chiefly to match their surroundings is largely wrong. The dominant functions are social signalling and temperature regulation, with camouflage a secondary and mostly baseline matter. How the crystal spacing is actively controlled at cellular level is still being worked out.
