Ecogeographic rules explain spatial trends in biodiversity, species interactions and phenotypes1. Gloger's rule and its corollaries state that pigmentation of endothermic animals will increase from more polar to equatorial regions due to changing selective pressures including heat, humidity, predation and UV irradiance2–4. In plants, floral pigmentation varies within and among taxa, yet causes of wide-scale geographic variation are lacking. We show that Gloger's rule explains patterns of variation in UV-absorbing floral pigmentation in a widespread plant, Argentina anserina (Rosaceae). Specifically, the floral pigmentation pattern unique to the UV spectrum (UV ‘bullseye’) increases with proximity to the Equator in both hemispheres, and larger bullseyes are associated with higher UVB incidence. Experiments confirm UV as an agent of selection and bullseye size as a target. Results extend the generality of an ecogeographic rule—formulated for animals—to plants, implicating UV as a selective agent on a floral trait generally assumed to enhance plant–pollinator interactions. Global change is expected to alter UV irradiance in terrestrial systems5, potentially intensifying the importance of UV-mediated selection to floral evolution. Because floral UV reflectance and pattern enhance pollinator attraction6,7, altered selective regimes could disrupt coevolved plant–pollinator interactions, weakening an important ecosystem service8.