Display of bright and striking color patterns is a widespread way of communication in many animal species. Carotenoid‐based coloration accounts for most of the bright yellow, orange, and red displays in invertebrates, fish, amphibians, reptiles, and birds, being widely considered a signal of individual health. This type of coloration is under the influence of several factors, such as sexual selection, predator pressure, pigment availability, and light transmission. Fish offer numerous examples of visual communication by means of color patterns. We used a small cyprinodontid fish, Aphanius fasciatus (Valenciennes, 1821), as a model species to assess habitat constraints on the color display in male caudal fin. Populations from natural and open/closed artificial habitats were tested for differences in the pigmentation of caudal fins. The most important factors explaining the intensity of coloration were the habitat type and the chlorophyll concentration in the sediment, followed by water turbidity; yellow fins were observed in natural habitats with low chlorophyll concentration and high water turbidity, while orange fins occurred in artificial habitats with high chlorophyll concentration and low turbidity. Furthermore, A. fasciatus in artificial habitats showed a higher somatic and a lower reproductive allotment with respect to natural habitats, according to the existing literature on the species. Furthermore, in closed artificial habitats, where the most intense reddish coloration of caudal fins was observed, a trade‐off between somatic growth and the coloration intensity of a carotenoid‐based sexual ornament has been observed; in these populations, intensity of caudal fin coloration was negatively related to the somatic allotment. Results of this study suggested how both the pigmentation of male's caudal fin and the life history strategies of the species are constrained by habitat characteristics.