Phenotypic plasticity is a key trait of successful pest species, and may increase the ability to cope with higher, more variable temperatures under climate change. We investigate the plasticity of preferred temperature in a widespread agricultural pest, the wingless grasshopper (Phaulacridium vittatum). Preferred temperature is a measure of thermoregulatory behaviour through habitat selection. It is influenced by melanism, which affects body temperature by determining the amount of radiation absorbed by the body. First we demonstrate that body temperature and preferred temperature in P. vittatum is influenced by melanism, by comparing the preferred temperature of the colour morphs in laboratory thermal gradients and field body temperatures in natural populations. We then test whether preferred temperature changes in response to changes in body temperature, by determining preferred temperature before and after manipulation of melanism by painting. When melanism was manipulated experimentally in live grasshoppers, preferred temperature changed to reflect the thermal qualities of the new colour. The preferred temperature of light grasshoppers increased after they were painted black, and decreased after being painted white. Similarly, dark individuals that were painted white behaved like a light individual, maintaining a lower body temperature. Preferred temperature in P.vittatum is a plastic thermoregulatory response to ambient temperature, mediated by the influence of melanism on body temperature.