Animals

Maintenance of and experiments on animals were approved by the Geneva Canton ethical regulation authority (authorization 1008/3421/1R) and performed according to the Swiss law.

Skin structure and Raman spectroscopy

We examined the skin (ultra)structure by histology and TEM, using standard procedures, for example, as described in ref. 14. Samples were taken with biopsy pinches (diameter 2 mm) from male skin patches: when comparing skin before and after excitation, biopsies were separated by a maximum distance of 1 cm. For the relaxed state, the biopsy was taken within a few seconds after taking the animal from its cage and immediately placed in fixative. For the excited state, the animal was engaged in a male–male combat and a biopsy was taken again. The colour of skin biopsies was checked after fixation, to ensure that only those samples with well-preserved colours were used for TEM.

Semi-thin (2 μm) and ultra-thin (80–90 nm) cross-sections were cut with a diamond knife on a Leica UCT microtome. Ultra-thin sections were viewed with a Tecnai G2 Sphera (FEI) TEM at 120 kV before and after staining with uranyl acetate and lead citrate. Raman spectroscopy16 was performed on melanophores directly on 2 μm cross-sections of skin samples with a home-made micro-Raman system composed of a 50-cm focal length spectrometer coupled to a nitrogen-cooled Princeton charge-coupled device detector and an argon laser (wavelength 514.5 nm) as the excitation source.

Nanocrystal measurements

For S-iridophores, crystal height, length and spacing between nearest crystals were measured on unstained and stained sections (original magnification × 19,000) of the same skin samples. Distances between nearest crystals were similar for unstained (179.9±30.2, N=85) and stained (180.3±26.9, N=94) sections. A first set of experiments indicated that the average diameter of the more or less spherical ‘holes’ remaining after staining (124.2 nm, N=103) reasonably approximates the average size of intact crystals (length=149.7±15.3 nm, height=94.7±11.5 nm, N=145). Hence, all Supplementary Data were collected on multiple TEM images of stained sections (performed on samples obtained from skin of various colours; Supplementary Table 1).

For D-iridophores, white ‘rectangular holes’ (Fig. 1e; corresponding to guanine crystals dissolved during post staining) on × 800 magnification TEM images were fitted (in JMicroVision36) with ellipses and geometric parameters (length, height and orientation) were computed subsequently. We performed Fourier transform analyses (as described in ref. 28), for each skin sample, on large assemblies of 20–30 high-resolution TEM images (1 pixel=15 nm, typical size of a guanine crystal=200 nm) spanning over 100 × 100 μm, that is, about 50 times the length of the longest wavelength investigated inside the material (corresponding to 2.5 μm in vacuum). Each assembly included more than 100,000 crystals.

Photometry

High-quality photographs and movies were obtained with a high-resolution digital single-lens reflex camera (Nikon D800) and a Panasonic HDC-HS700 video camera, respectively. To analyse each video frame (Supplementary Fig. 2a), RGB band-pass filters were applied (Supplementary Fig. 2b) to select a colour window through which the variations of RGB channels were monitored (Supplementary Fig. 2c). The corresponding RGB numbers of each frame were averaged across the picture (Supplementary Fig. 2d) and normalized over the sum (R+G+B) (Supplementary Fig. 2e), to remove fluctuations of illumination as well as potential global variation in skin reflectivity caused by movements of melanosomes. Next, each channel was normalized from 0 to 1 (Supplementary Fig. 2f), to exclusively measure the variation occurring (in S-iridophores) over a relatively constant background colour (generated by D-iridophores and/or pigments). After transformation of RGB numbers from video into CIE XYZ tristimulus values, we derived the final x and y values that define colour irrespective of its luminance. Experimental traces (dots) are plotted and compared with the model (dashed line) on the CIE chromaticity chart (Figs 1b and 2c).

Skin reflectivity in the ultraviolet range, highly relevant for colour perception in reptiles37,38, is not recorded by RGB photometry. This does not have an impact on our conclusions, as the excellent matching between the modelled photonic response and photometry analyses validates our conclusions. In addition, photometric measurements have been validated with accurate spectroscopic measurements ex vivo (Fig. 2b) and show that XYZ/RGB photometric videography is sufficient to detect the wavelength shift in the reflectivity spectrum. In-vivo measurements of skin reflectivity (including in the ultraviolet range) with spectrometers directly on the animal skin are difficult, mainly because the animals move and because chameleon skin darkens very rapidly when it comes in contact with the optical probe.

Optical modelling

The symmetry of the close-packed photonic crystals present in the top layer (S-iridophores) of the skin was deduced from direct observations, under TEM, of crystals sectioned in different planes (Fig. 1d). The structural element common to all close-packed structures is a triangular two-dimensional arrangement. Studies of the effect of symmetry variations (pp. 307–308 in ref. 39) have indicated that, for a/λ<1 the optical response is mostly sensitive to the first Fourier component of the dielectric modulation. All close-packed structures have the same first-order Fourier component. To model the photonic structure effect that corresponds to our samples, it is therefore sufficient to choose face-centred cubic crystal symmetry. Crystal diameter (d) and distance between centres of nearest crystals (s) were measured (on about 1,200 individual crystals, Supplementary Table 1) on TEM images as described above and the lattice parameter a was computed as s√2. The first irreducible Brillouin zone (red lined contour in Supplementary Fig. 3b) was meshed and the band energies were computed for each vertex centre using block-iterative frequency-domain methods as implemented in the Massachusetts Institute of Technology photonic band package26. For each direction of light propagation in the structure (that is, each mesh triangle centre at the surface of the Brillouin zone), the reflectivity was set to unity in gapped frequency regions. As no preferential orientation of photonic crystals relative to the skin surface was observed in S-iridophores, the weighted average among all directions was computed using the dimensionless a/λ parameter, where λ refers to the corresponding light wavelength in air and a represents the lattice parameter. The refractive indices of guanine and cytoplasm were set to 1.83 and 1.33, respectively13. Convolution of local and average reflectivity with standard spectral functions returns X, Y and Z colour numbers. Colour of each vertex and the average colour are plotted inside and outside of the irreducible Brillouin zone, respectively. Supplementary Movie 5 shows the evolution of local and average colours as the lattice parameter varies.

Reflectivity measurements

Reflectivity of skin samples was measured using a monochromatic source and the locked-in detection of a spectroscopic Woollam ellipsometer from 300 to 2,500 nm and with a resolution of 5 nm. Monochromatic light of the source was injected in one channel of a reflection fibre probe (QR400-7-VIS-NIR). The light reflected on the sample (near-normal incidence) was collected by the second optical fibre channel and guided to a silicon photodiode (for visible range) and constrained InGaAs detectors (for the near-infrared range). A white diffuse standard (Ocean Optics WS-1-SL) was used as reference. This set up allowed measurements in air or in a solution with adjustable osmolarity (from Ringer’s 1 × to 6 × , that is, from 236 to 1,416 mOsm).

Single-cell videography

Photometric videography on individual S-iridophores, were measured with adjustable osmolarity. Osmotic pressure was applied to fresh skin samples taken with biopsy pinches (diameter 2 mm) from white stripes of male panther chameleons. Samples were placed in a Ludin chamber where Ringer’s 1 × solution (236 mOsm) was slowly replaced with Ringer’s 4 × solution (944 mOsm). Full high-definition videos (1,920 × 1,080 pixels) were recorded with a Nikon D800 camera attached to a Leica MZ16 stereoscope. XYZ/RGB evolution of individual S-iridophores were obtained following the normalization procedure described in the ‘Photometry’ section.