The evolution of several floral traits is thought to be driven by multiple selective agents, including pollinators and herbivores. Similar combinations of selection pressures may have shaped extra-floral traits. The conspicuous purple tufts of leaves (''flags''), which often terminate vertical inflorescences in the Mediterranean annual Salvia viridis, were shown to attract insect pollinators to the flowering patch. Here we test whether they also function as anti-herbivore signals. We determined the aposematic potential of S. viridis flags on three levels: concentrations of anthocyanins, suggested to function as aposematic visual signals, in leaves and flags; spectrometry to estimate whether the color-vision system of two common Mediterranean generalist herbivores (locusts and goats) can discriminate flags from leaves; and choice experiments to determine food preferences of the same herbivores. Anthocyanin concentrations in flags were [10-fold higher than in leaves. Flags exhibited peak reflectance at 450 and 700 nm wavelengths, while leaves reflected maximally at 550 nm. According to the Vorobyev-Osorio color vision model, these differences in color reflection are likely to allow visual discrimination by herbivores. Goats preferred feeding on clipped inflorescences over control inflorescences. Locusts preferred leaves over flags. To test whether this was due to deterrence from the flags' coloration, we also offered them choice between leaves and a rare, white morph, of the flags. The locusts chose both equally immediately after presentation, but leaves attracted more individuals after 5 min of feeding. The locusts also preferred green cabbage over anthocyanin-rich red cabbage. These results support the function of colorful extrafloral displays as warning signals.