Clines can signal spatially varying selection and therefore have long been used to investigate the role of environmental heterogeneity in maintaining genetic variation. However, clinal patterns alone are not sufficient to reject neutrality or to establish the mechanism of selection. Indirect, inferential methods can be used to address neutrality and mechanism, but fully understanding the adaptive significance of clinal variation ultimately requires a direct approach. Ecological model systems such as the rocky intertidal provide a useful context for direct experimentation and can serve as a complement to studies in more traditional genetic model systems. In this study, we use indirect and direct approaches to investigate the role of environmental heterogeneity in the maintenance of shell colour polymorphism in the flat periwinkle snail, Littorina obtusata. We document replicated clines in shell colour morph frequencies over thermal gradients at two spatial scales, contrasting with patterns at previously reported microsatellite loci. In addition, experimental results demonstrate that that shell colour has predictable effects on shell temperature and that these differences in temperature, in turn, coincide with patterns of survivorship under episodic thermal stress. Direct manipulation of shell colour revealed that shell colour, and not a correlated character, was the target of selection. Our study provides evidence that spatially varying selection via thermal regime contributes to the maintenance of shell colour phenotype variation in L. obtusata in the sampled areas of the Gulf of Maine.