Both sexual selection and natural selection can influence the form of dimorphism in secondary sexual traits. Here, we used a comparative approach to examine the relative roles of sexual selection and natural selection in the evolution of sexually dimorphic coloration (dichromatism) and ornamentation in agamid lizards. Sexual dimorphism in head and body size were used as indirect indicators of sexual selection, and habitat type (openness) as an index of natural selection. We examined separately the dichromatism of body regions "exposed to" and "concealed from" visual predators, because these body regions are likely to be subject to different selection pressures. Dichromatism of "exposed" body regions was significantly associated with habitat type: males were typically more conspicuously coloured than females in closed habitats. By contrast, dichromatism of "concealed" body regions and ornament dimorphism were positively associated with sexual size dimorphism (SSD). When we examined male and female ornamentation separately, however, both were positively associated with habitat openness in addition to snout-vent length and head SSD. These results suggest that natural selection constrains the evolution of elaborate ornamentation in both sexes as well as sexual dichromatism of body regions exposed to visual predators. By contrast, dichromatism of "concealed" body regions and degree of ornament dimorphism appear to be driven to a greater degree by sexual selection.