This review outlines how eyes of terrestrial vertebrates and insects meet the competing requirements of coding both spatial and spectral information. There is no unique solution to this problem. Thus, mammals and honeybees use their long-wavelength receptors for both achromatic (luminance) and colour vision, whereas flies and birds probably use separate sets of photoreceptors for the two purposes. In particular, we look at spectral tuning and diversification among 'long-wavelength' receptors (sensitivity maxima at greater than 500 nm), which play a primary role in luminance vision. Data on spectral sensitivities and phylogeny of visual photopigments can be incorporated into theoretical models to suggest how eyes are adapted to coding natural stimuli. Models indicate, for example, that animal colour vision--involving five or fewer broadly tuned receptors--is well matched to most natural spectra. We can also predict that the particular objects of interest and signal-to-noise ratios will affect the optimal eye design. Nonetheless, it remains difficult to account for the adaptive significance of features such as co-expression of photopigments in single receptors, variation in spectral sensitivities of mammalian L-cone pigments and the diversification of long-wavelength receptors that has occurred in several terrestrial lineages.