BackgroundAnthocyanins, a class of specialized metabolites that are ubiquitous among plant species, have attracted a great deal of attention from plant biologists due to their chemical diversity. They confer purple, pink, and blue colors that attract pollinators, protect plants from ultraviolet (UV) radiation, and scavenge reactive oxygen species (ROS) to facilitate plant survival during abiotic stress. In a previous study, we identifiedBeauty Mark(BM) inGossypium barbadenseas an activator of the anthocyanin biosynthesis pathway; this gene also directly led to the formation of a pollinator-attracting purple spot.ResultsHere, we found that a single nucleotide polymorphism (SNP) (C/T) within theBMcoding sequence was responsible for variations in this trait. Transient expression assays ofBMfromG. barbadenseandG. hirsutuminNicotiana benthamianausing luciferase reporter gene also suggested that SNPs in the coding sequence could be responsible for the absent beauty mark phenotype observed inG. hirsutum.We next demonstrated that the beauty mark and UV floral patterns are associated phenotypes and that UV exposure resulted in increased ROS generation in floral tissues; BM thus contributed to ROS scavenging inG. barbadenseand wild cotton plants with flowers containing the beauty mark. Furthermore, a nucleotide diversity analysis and Tajima’sDTest suggested that there have been strong selective sweeps in theGhBMlocus duringG. hirsutumdomestication.ConclusionsTaken together, these results suggest that cotton species differ in their approaches to absorbing or reflecting UV light and thus exhibit variations in floral anthocyanin biosynthesis to scavenge reactive ROS; furthermore, these traits are related to the geographic distribution of cotton species.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12915-023-01591-5.