Chameleons change color through a combination of specialized cells called chromatophores. These cells contain pigments that can expand or contract, allowing the chameleon to adjust the colors they display. Additionally, chameleons can change color in response to various factors such as temperature, light, mood, and social interactions.