Being a prey is always hard; being a toxic prey is somehow better, but you have to warn your enemies you are not a good deal. How do you do it? Toxic or otherwise harmful animals display colourful visual signals that mean "don't eat me, or you will regret it". Predators at first may not know the meaning of the signal, but after their first encounter, they will learn to avoid the colourful but toxic ones, and the other preys will be saved. But how did this kind of signaling evolve? Why some species evolve it, and some else not?
Analyzing the evolution of the caterpillars of the butterflies Papilio , Kathleen D. Prudic and coworkers discovered that the evolution of such signals is most influenced by the visual background on which the caterpillar preferibly is found. Caterpillars eating herbs or other narrow-leaved plants independently evolved warning signals for predators, while the ones eating on trees and other plants with large leafs did not. That is, warning signals evolve where there are consistent backgrounds that make it easier for the predator to recognize them and learn, while on complex environments like trees such visual clues could take a while to be recognized by predators, making the strategy inefficient.