Chameleons change color through specialized cells called chromatophores in their skin. These cells contain pigment that can expand or contract, allowing the chameleon to adjust the wavelengths of light that are reflected off their skin. Additionally, chameleons can also change color based on their mood, temperature, and communication with other chameleons.