Abstract Non-signaling functions of coloration include thermoregulation (thermal melanism hypothesis), protection against ultraviolet radiation (photoprotection hypothesis), and concealment from predators (crypsis hypothesis). We investigated whether dorsal coloration in 19 populations of spiny-footed lizards, Acanthodactylus erythrurus, across the Iberian Peninsula varies according to these functions. We captured adult males and females in each population and calculated standardized dorsum brightness estimates from photographs. We also calculated standardized ground luminosity estimates and gathered information on latitude, altitude, mean annual temperature, and mean annual solar radiation for each location. Males showed a higher percentage of black coloration and a more contrasted dorsum than females, suggesting different selection pressures on dorsal coloration in both sexes. Furthermore, males showed a darker dorsum and a higher percentage of black coloration at higher altitudes and when the ground was darker. In contrast, females exhibited a darker dorsum only when the ground was darker and a higher percentage of black coloration only at higher altitudes. We also observed that the variation of dorsum luminosity within males and the variation of dorsum luminosity among females within populations were both positively related to the variation of ground luminosity among different points within locations. Latitude, temperature, and solar radiation were not significantly related to dorsal coloration in either sex. Our results support the photoprotection and crypsis hypotheses in males and, to some extent, in females, whereas the thermal melanism hypothesis is weakly supported in both sexes. These findings suggest that there is local adaptation in the dorsal coloration of the spiny-footed lizard.