The colors come from their skin playing with light.

Chameleons have the ability to change the color of their skin. And, researchers at the University of Geneva have uncovered the secret.

The chameleon’s skin is made up of two layers. The bottom layer is yellow. The top layer has tiny crystals inside it that play with light.

When the male chameleon is relaxed, the crystals in the top layer of the skin are close together. White light, which contains all the colors of the rainbow, shines onto the skin, but only blue bounces back from the top layer. This color combines with the yellow color from the bottom layer to make green.

This phenomenon of creating colors with patterns is what scientists call structural color. Structural color is pretty common in the animal kingdom. Many insects (beetles and butterflies) and birds (peacocks) create color this way. Light shines onto the patterns and only certain colors come off. You can think of the skin as tiny mirrors that select the colors that will be seen.

Structural color occurs in everyday life too. If you look at a soap bubble, you’ll see hints of color. Or if you look at the bottom of a CD, you’ll see hints of color too. Both the soap bubbles and CDs are clear, but the patterns that are on their surfaces play with light to create color. Next time you are at the gas station and see oil on the ground, you’ll see bands of color. This is structural color at work too as the film goes from thick to thin.

When the male chameleon gets angry or wants to attract a mate, it changes the distance between the crystals in its skin. This time when white light shines on the skin, only red bounces back. And that red color combines with the yellow from the first layer to make orange.

Interestingly, the tiny crystals in the skin are too small to see with the human eye. They are a nanometer in size. A nanometer is equal to one-one hundred thousandths of your hair. To find them, researchers had to take a small sample of the chameleon’s skin and measure it with a special microscope. Scientists took samples when the chameleon was relaxed and then again when it was agitated.

Now, researchers are now trying to find out how chameleons know the change the distance between the crystals. And, engineers want to use these patterns to make computer screens with less glare.

What there is no camouflaging is how clever chameleons are.