Predation is a major driving force in evolution. Predation has been shown to select for size, morphology, and camouflage. Many animals use camouflage to reduce predation risk. In some cases, individuals can adjust their pigmentation, enabling them a higher survival in a heterogeneous environment. Here, we show that the difference in pigmentation between juvenile perch individuals (Perca fluvuiatilis) occupying different environments (open water and vegetated habitats of lakes) is likely a consequence of predator selection. Lightly pigmented individuals have a higher chance of survival in open water whereas darker pigmented individuals survive better in vegetation. As a response to predators, individuals forced into the vegetation by predators developed darker skin whereas the skin of individuals forced into open water became lighter. In a common garden experiment, in the absence of predation, we found that pigmentation in juvenile perch is only due to plasticity and not to genetic variation. However, contrary to predictions, individuals raised in open water developed darker skin compared to individuals raised in vegetation. This may be a response to UV-stress. Overall, our results suggest that predation can be a strong selective agent on pigmentation differences among conspecifics occupying different habitats.