The chameleon has several cell layers beneath its transparent skin. These layers are the source of the chameleon's color change. Some of the layers contain pigments, while others just reflect light to create new colors.
Several factors contribute to the color change.
A popular misconception is that chameleons change color to match their environment. This isn't true. Light, temperature, and emotional state commonly bring about a chameleon's change in color. The chameleon will most often change between green, brown and gray, which coincidently, often matches the background colors of their habitat.