We present a theoretical approach to the optimization of crypsis in heterog
eneous habitats. Our model habitat consists of two different microhabitats,
and the optimal combination of crypsis in the microhabitats is supposed to
maximize the probability of escaping detection by a predator. The probabil
ity of escaping detection for a prey is a function of: (i) degree of crypsi
s, (ii) probability of occurrence in the microhabitats and (iii) probabilit
y of encountering a predator in the microhabitats. Because crypsis is backg
round-specific there is a trade-off between crypsis in two visually differe
nt microhabitats. Depending on the nature of the trade-off, the optimal col
oration is either a compromise between the requirements of the differing mi
crohabitats or entirely adapted to only one of them. An increased risk of p
redation in one of the microhabitats favours increased crypsis in that micr
ohabitat. Because the trade-off-constrains possible optimal solutions, it i
s not possible to predict the optimal coloration only from factors (i)-(iii
). However, habitat choice may fundamentally change the situation. If minim
izing predation risk does not incur any costs, the prey should exclusively
prefer the microhabitat where it has a lower probability of encountering a
predator and better crypsis. The implications of these results for variatio
n in cryptic coloration and polymorphism are discussed. (C) 1999 The Linnea
n Society of London.