The initial evolution of aposematic and mimetic antipredator signals is thought to be paradoxical because such coloration is expected to increase the risk of predation before reaching a stage when predators associate it effectively with a defense. We propose, however, that constraints associated with the alternative strategy, cryptic coloration, may facilitate the evolution of antipredator signals and thus provide a solution for the apparent paradox. We tested this hypothesis first using an evolutionary simulation to study the effect of a constraint due to habitat heterogeneity, and second using a phylogenetic comparison of the Lepidoptera to investigate the effect of a constraint due to prey motility. In the evolutionary simulation, antipredator warning coloration had an increased probability to invade the prey population when the evolution of camouflage was constrained by visual difference between microhabitats. The comparative study was done between day-active lepidopteran taxa, in which camouflage is constrained by motility, and night-active taxa, which rest during the day and are thus able to rely on camouflage. We compared each of seven phylogenetically independent day-active groups with a closely related nocturnal group and found that antipredator signals have evolved at least once in all the diurnal groups but in none of their nocturnal matches. Both studies lend support to our idea that constraints on crypsis may favor the evolution of antipredator warning signals.