Trinidad guppies (Poecilia reticulata) are distributed along an environmental gradient in carotenoid availability that limits the carotenoid content of the orange spots of males. The amount of synthetic red pteridines (drosopterins) in the orange spots covaries with the carotenoid content, such that the ratio of the two types of pigments is roughly conserved across streams. Carotenoids and drosopterins have different spectral properties and thus the ratio of the two types of pigments affects the shape of the orange spot reflectance spectrum. Geographic conservation of the carotenoid:drosopterin ratio suggests that males may be under selection to maintain a particular hue. We tested this hypothesis by comparing the pigmentation and coloration of guppies from six streams in the field to that of second-generation descendants of the same populations raised on three dietary carotenoid levels in the laboratory. The results show clearly that the geographic variation in drosopterin production is largely genetic and that the hue of the orange spots is conserved among populations in the field, relative to the laboratory diet groups. This is a countergradient pattern because genetic differences between populations in drosopterin production mask the effect of carotenoid availability on the hue of the orange spots. The potential for countergradient sexual selection to contribute to reproductive isolation between populations is discussed.