Long‐wavelength‐sensitive (lws) opsin gene expression, foraging and visual communication in coral reef fishes

Coral reef fishes are diverse in ecology and behaviour and show remarkable colour variability. Investigating the visual pigment gene (opsin) expression in these fishes makes it possible to associate their visual genotype and phenotype (spectral sensitivities) to visual tasks, such as feeding strategy or conspecific detection. By studying all major damselfish clades (Pomacentridae) and representatives from five other coral reef fish families, we show that the long‐wavelength‐sensitive (lws) opsin is highly expressed in algivorous and less or not expressed in zooplanktivorous species. Lws is also upregulated in species with orange/red colours (reflectance >520 nm) and expression is highest in orange/red‐coloured algivores. Visual models from the perspective of a typical damselfish indicate that sensitivity to longer wavelengths does enhance the ability to detect the red to far‐red component of algae and orange/red‐coloured conspecifics, possibly enabling social signalling. Character state reconstructions indicate that in the early evolutionary history of damselfishes, there was no lws expression and no orange/red coloration. Omnivory was most often the dominant state. Although herbivory was sometimes dominant, zooplanktivory was never dominant. Sensitivity to long wavelength (increased lws expression) only emerged in association with algivory but never with zooplanktivory. Higher lws expression is also exploited by social signalling in orange/red, which emerged after the transition to algivory. Although the relative timing of traits may deviate by different reconstructions and alternative explanations are possible, our results are consistent with sensory bias whereby social signals evolve as a correlated response to natural selection on sensory system properties in other contexts.


| INTRODUC TI ON
A central objective in biology is to understand changes in biological diversity through time and lineages, especially the processes of speciation and the emergence of species-rich clades. Ecological niches are multidimensional and ecological diversification may be positively correlated with niche dimensionality (Nosil & Sandoval, 2008). In this study we focus on the extremely species-rich group of tropical coral reef fishes that display extraordinarily high diversity in ecology, behaviour and (colour) phenotype (Randall et al., 1997). Reef fishes, especially those inhabiting shallow water coral reefs in the tropics, live in a light-flooded and spectrally diverse environment (Cox et al., 2021). Many are themselves, often conspicuously, colourful (Lorenz, 1962;Marshall, 2000a), and importantly, have evolved diverse visual sensitivities and tuning mechanisms (Carleton et al., 2020;Cortesi et al., 2020). The study of colourful coral reef fish living in a multidimensional adaptive landscape allows us to gain valuable insights into the evolutionary interactions between vision, visual signalling traits, behaviour and ecology .
In teleosts, a multitude of tuning mechanisms, including opsin gene evolution via duplications and deletions, sequence variability and (co)expression, is used to presumably optimize vision (i.e., spectral sensitivities) for the prevailing light environment and/or visual tasks (reviewed in Carleton et al., 2020). In the photoreceptor cells of the retina, opsins, together with a vitamin A-derived chromophore, form the functional unit of visual pigments that absorb light and constitute the first step in visual processing (Wald, 1968;Yokoyama, 2008).
Coral reef fishes of the superorder Acanthopterygii have evolved a number of different visual tuning mechanisms and a set of spectral sensitivities peaking anywhere between the ultraviolet (UV) and the red spectrum of light (350-600 nm) (Carleton et al., 2020;Cortesi et al., 2020;Losey et al., 2003;Luehrmann et al., 2019;Marshall et al., 2019;Phillips et al., 2016;Siebeck & Marshall, 2001;Stieb et al., 2017). While medium-wavelength-sensitivity (i.e., from blue to green) is well matched to the most prevalent light on coral reefs , spectral sensitivities at either end of the spectrum (i.e., UV and red) seem more likely to represent adaptations to one or more specific visual tasks. For example, damselfishes (Pomacentridae) use their UV vision to detect UV patterns of con-or heterospecifics (Siebeck et al., 2010). Herbivorous algae-feeding damselfishes also display enhanced red sensitivity (Stieb et al., 2017) as it increases algal contrast (due to the red and far-red-reflecting part of chlorophyll) when seen against the reef background (Marshall et al., 2003b). Longwavelength-sensitivity may furthermore play a role in inter-or intraspecific communication in species that use red colour signals, such as many cichlids (Seehausen et al., 2008), guppies (Sandkam et al., 2018), medaka (Kamijo et al., 2018) or indeed other reef fishes (Marshall et al., 2003b). Once evolved, sensitivity to a specific spectral range is likely to be exploited by other visual tasks, as has been shown for guppies (Endler, 1983;Grether et al., 2005;Kodric-Brown, 1989;Rodd et al., 2002) or Old World monkeys (Fernandez & Morris, 2017) that feed on reddish fruit and also use red for social signals.
In this paper, we focused on the emergence of long-wavelength-(red)-sensitivity and its function in coral reef fishes by extending our previous work on opsin gene evolution. We mainly focused on damselfishes. This speciose family of small to medium-sized reef fishes mirrors the high behavioural, ecological and colour diversity found among coral reef fishes more broadly (Allen, 1991). Importantly for this work, damselfishes are also one of the most studied reef fish families in terms of opsin evolution. Of the 21 species analysed thus far, only benthic herbivorous but not zooplanktivorous damselfishes expressed increased levels of lws producing red-sensitive visual pigments (Stieb et al., 2017). We now aimed to reveal whether a sensory bias towards red sensitivity in algal feeding damselfishes is also exploited in yellow-red colour signalling. Our predictions were that: (1) benthic herbivory and red colours would both correlate with enhanced red sensitivity as shown by higher lws expression, (2) red sensitivity has a functional benefit in detecting algae and red colour signals, (3) specialization for algae feeding is followed by the evolution of red signalling colours and (4) following on from prediction 3, only algal feeding species have evolved red coloration. To test for a relationship of long-wavelength-sensitivity (lws expression) with feeding ecology (benthic herbivory), social signalling (longwavelength-reflecting colours; yellow, orange, and red), or both, we combined our previous work with newly sequenced retinal transcriptomes to generate a more extensive damselfish data set. To go beyond the damselfish radiation, we also included pairs of benthic herbivorous and zooplanktivorous species from five other typical tropical reef fish families, including butterflyfishes (Chaetodontidae), angelfishes (Pomacanthidae), blennies (Blennidae), surgeonfishes (Acanthuridae), and labrids/wrasses (Labridae). To test for a functional benefit of seeing red, we next computed a damselfish visual system and modelled whether red sensitivity may improve the detection of benthic algae and the detection of yellow, orange, or red coloured conspecific signals. Lastly, by reconstructing ancestral character states, we assessed the sequence of emergence of lws expression, trophic groups and orange/red colour signals and their possible evolutionary interactions across the damselfish phylogeny. Fish used for molecular analysis were anaesthetized with an overdose of clove oil and killed by decapitation within 24 h after capture. Retinas were dissected out and preserved in RNAlater (Ambion) until further processing. Dissection took place during the daytime, at least 1 h after dawn and before dusk, respectively.

| Specimen collection
The relative cone opsin expression has previously been shown not to be affected by time of day in several damselfish species (Stieb et al., 2016). Further, we normalized opsin expression by proportion of cone type, which was empirically determined to be the best method for removing time-of-day variation (Yourick et al., 2019
For this, we compiled a data set based on previous results (Phillips et al., 2016;Tettamanti et al., 2019) and generated new transcriptomes for the remaining species following our previously established protocols (Luehrmann et al., 2019;Musilova et al., 2019). To confirm the assignment of newly obtained opsin sequences to the correct opsin gene type/family, we used a fish-opsin reference data set to reconstruct maximum-likelihood amino acid trees using PHYML (100 bootstrap iterations) (Dereeper et al., 2008 Transcriptomes were processed following previously published methods (Cortesi, Musilová, et al., 2015;de Busserolles et al., 2017) using the online Bioinformatics platform Galaxy version 1.0.4 (Research Computing Centre, The University of Queensland, Australia) (Afgan et al., 2015). In short, data were converted using FASTQ Groomer, quality checked using FastQC, and trimmed using customized settings in Trimmomatic. Trinity was used for de novo assembly of transcripts, with a group pair distance of 250 bp, and minimum inchworm kmer coverage of 2. Further bioinformatic analyses were performed using Geneious software (version 9.0.4).
Assembled transcripts were then mapped to known and publicly available opsin genes of reference species (see Figure S1). To manually check for gene duplications, we followed previously described methods (Cortesi, Musilová, et al., 2015;de Busserolles et al., 2017).
Briefly, after identification of candidate gene coding sequences, unassembled reads were mapped to the opsin gene repertoire of the species using medium-sensitivity settings (70% identity threshold).
Deviating reads were then extracted by working from single polynucleotide polymorphism (SNP) to SNP by exploiting paired-end matching to cover gaps, and their consensus sequence was used as species-specific reference for repeated high-specificity (100% identity) mapping of unassembled reads until maximum obtainable sequence length was reached. To analyse differences in relative cone opsin gene expression, we mapped the unassembled filtered PE reads against the CDSs of genes extracted from the transcriptomes (as per Cortesi, Musilová, et al., 2015 andde Busserolles et al., 2017).

| Relative opsin gene expression given as proportional single and double cone expression
The coral reef fishes examined here possess single and double cones (two single cones fused together) which either express sws or rh2 and/or lws genes , respectively. Consequently, quantitative cone opsin expression is given as proportional expression of the total single (sws1s and sws2s) and total double cone expression (rh2s and lws), respectively. Proportional gene expression was then calculated according to where T i /T (single resp. double cones) is the gene expression ratio for a given gene T i normalized by the total genes expressed in all single cones or in all double cones T (single resp. double cones) , N i is the number of mapped reads for a given gene divided by its length, and n is the number of genes (single resp. double cone genes) in a species's transcriptome.
Because cone opsin expression is given as a fraction of the total single (sws1s and sws2b) and total double cone expression (rh2s and lws), respectively, we reanalysed expression data gained from Stieb et al. (2016from Stieb et al. ( , 2017 for damselfish and from Phillips et al. (2016) for labrids to calculate the proportional expression of single and double cone opsin genes, respectively.

| Spectral reflectance
We compiled spectral reflectance data on live specimens (as per Marshall et al., 2003b) for 35 species (newly generated, n = 10; from (1) T i ∕ T all(single resp. double cones) = N i ∕ ∑ N i + n the literature, n = 25 [Cheney & Marshall, 2009;Marshall, 2000b;Siebeck, 2002;Stieb et al., 2017]), following the colour categorization in Marshall (2000b well as common areas that may reflect in UV (Marshall, 2000a), such as the surroundings of the eyes and mouth, the operculum, fins and the caudal peduncle. At least 10 measurements per area and individual were taken and subsequently averaged.

| Relationship of proportional opsin gene expression with diet and coloration
To identify possible evolutionary correlations between damselfish cone opsin expression and either trophic groups or long wavelength (yellow, orange and red) coloration, we computed phylogenetic gen- To compare opsin expression to feeding ecology, we placed species into three different trophic groups: herbivores, zooplanktivores, or omnivores (Table S2), with omnivores known to forage on both zooplankton and algae. To test for relationships of opsin expression to different patterns of fish coloration, we grouped species first based on having yellow coloration (reflectance starting beyond 500 nm) and second, based on having orange/red (reflectance starting beyond 520 nm) coloration (including coloration of fins or bodies, or patches thereof). We first determined the historical evolutionary dependence of opsin gene expression on trophic groups, yellow, and orange/red coloration independently. If more than one of these variables had a significant effect on expression, they were subsequently tested together. Finally, we were interested in how long-wavelength sensitivity is affected when orange/red coloration is attributed to a trophic group. For this, we tested proportional double cone lws ex-

| Visual modelling
We performed visual modelling as we were interested in whether an additional long-wavelength-sensitive visual pigment (LWS) might enhance the fish's capability to detect benthic algae and/ or conspecifics. For this, modelling was performed using a typical UV-transmitting damselfish lens (we used the lens of Dacyllus aruanus [Stieb et al., 2017]). We constructed a trichromatic damselfish with a range of 525-565 nm λ max (5 nm increments) (a λ max of 560 nm was measured in Pomacentrus melanochir [Loew & Lythgoe, 1978]).
While the different members of double cones can express two distinct visual pigments (as for example LWS and RH2B), one member of double cones can also coexpress two different opsin pigments are used in colour vision as independent spectral channels comes from behavioural studies in the reef fish Rhinecanthus aculeatus (Pignatelli et al., 2010).
We first calculated the quantum catch of different photoreceptors as they viewed the light reflected off different targets.
For visual differentiation, we used the receptor noise limited model to quantify the relative differentiation of two colour targets (e.g., Vorobyev et al., 2001)  and also against the host anemone in the case of the anemonefish Amphiprion biaculeatus.

| Quantum catch equations
Reflectance spectra from different targets used for quantum catch calculations were gathered as follows: fishes or the anemone were illuminated by sidewelling irradiance and algae and substrates by downwelling irradiance, both obtained from previous light measurements around Lizard Island (Stieb et al., 2016); reflectance data from the host anemone (Entacmaea quadricolor) of the anemonefish Amphiprion biaculeatus was measured anew, reflectance data from algae, the average reef, and rubble background was taken from Marshall et al. (2003b), average sand background was taken from Cortesi and Cheney (2010) and damselfish spectral reflectance was measured anew or taken from Marshall (2000a) and Stieb et al. (2017); for ambient illuminant, as a target, we used horizontal radiance obtained from previous measurements in reefs around Lizard Island (Stieb et al., 2016).
Quantum catch of horizontal radiance was assumed to be independent of viewing distance and for a given photoreceptor i can be calculated from where I rad,λ is the horizontal radiance, L λ is the lens transmission, A λ,i is the wavelength dependent photoreceptor absorptance using the Govardovskii (Govardovskii et al., 2000) opsin templates calculated for the respective λ max , and k i is the von Kries correction for colour constancy: Here, we included this normalization for consistency with previous studies and for plotting the quantum catches in a trichromatic visual space. However, this correction did not impact the final differentiation calculations for either colour or luminance, as comparisons between targets involved ratios of quantum catches, where the von Kries factor k i cancels out.
The quantum catch of a receptor i that views a target with reflectance spectra R λ illuminated by the sidewelling or downwelling irradiance, at zero viewing distance was given by For simplicity, we did not include the effects of viewing distance that would act to decrease the contrast values with distance due to scattering.

| Visual differentiation equations
Because very little is known about damselfish photoreceptor opponency, modelling was performed using the receptor noise
We also used BayesTraits version 3.0.1 (Pagel & Meade, 2006) to reconstruct lws expression in its original form, that is, as a continuous trait. We followed the advice in the BayesTrait's manual, and we first ran a random walk maximum likelihood (ML) analysis of lws expression on the damselfish tree to obtain a general estimate of the most likely gene expression level at the root of the tree (parameter α), which resulted in a value of c. 1.5%. Then we ran a new analysis based on a random walk Markov chain Monte Carlo (MCMC) approach in order to estimate ancestral states of all nodes and tips with missing data. Given that our preliminary ML analysis pointed to a low lws expression at the root of the tree, we set our MCMC with a strong prior (exponential prior with a mean of 1%). The observation that long-wavelength sensitivity (assuming lws expression) is rarely found among coral reef fishes Luehrmann et al., 2019;Phillips et al., 2016;Stieb et al., 2017), and seemingly is associated with specific behaviours, supports the usage of a strong prior on low lws expression at the root of the damselfish tree. For comparative purposes, we also set BayesTraits to reconstruct lws expression assuming an uninformative prior (uniform distribution, varying from 0 to 31%). For both settings, we ran three independent analyses with 100,000,000 generations each, with estimated parameters sampled every 10,000th generation. Mixing and convergence of the runs were confirmed.
In all ancestral state reconstructions aforementioned, we assigned the outgroups (Nile tilapia and the black surfperch) with no data on lws expression, coloration or trophic group to not impact ancestral trait states (both outgroup taxa belong to clades with considerable variation in all of our traits).

| RE SULTS
Opsin expression profiles of damselfish species are listed in Table S2, and opsin expression profiles of the other reef fish families (labrids, butterflyfishes, angelfishes, blennies, and surgeonfishes) are listed in Table 1 and Table S3. Protein-based maximum likelihood trees revealed that the newly extracted reef fish opsins (Genbank # OK350470-OK350614; Table S4) grouped with well-described opsin classes from other fish species ( Figure S1a,b). Colour categories, including the presence or absence of yellow and orange/red, for damselfish and species from the other reef fish families are summarized in Table S5. The presence of orange/red is found in 10 damselfishes (Table S2) and five of the other reef fish species (Table 1).
Reflectance data from various damselfish species with orange/red coloration are shown in Figure 1b(ii) and Figure S2a(ii). Reflectance data from various damselfish species with yellow or other colours are shown in Figure S2a(iii and iv). Spectral reflectance of the remaining species measured in this study are presented in Figure S3.
Trophic groups of damselfish species are listed in Table S2; trophic groups of the other reef fish families are listed in Table 1.
In summary, our results revealed that: Not only benthic herbivory, but also orange/red signalling colours correlate with enhanced red sensitivity, that is, enhanced lws expression in damselfishes. This trend was also found when going beyond the damselfish radiation: in pairs of zooplanktivorous and benthic herbivorous species from five other reef fish families, short-versus long-wavelength shifted opsin combinations covaried with zooplanktivory and herbivory, respectively. Also, orange/red colours were only found in the herbivorous species. Red sensitivity, modelled from a damselfish's visual perspective, is likely to provide a functional benefit in detecting algae and orange/red colour signals. Ancestral state reconstructions F I G U R E 1 Relationship of damselfish lws expression to trophic groups and coloration. (a) Lws expression (n = 39; given as proportional double cone expression) is significantly upregulated in omnivores and herbivores (algae feeders) compared to zooplanktivores (i), and in species with orange/red coloration compared to species not reflecting in red (ii). Within trophic groups, proportional double cone lws expression is significantly increased in red compared to nonred omnivores and shows a trend to be increased in red compared to nonred herbivores (iii). Boxplots: box indicates Q2 and Q3, with the line indicating the median; whiskers indicate Q1 and Q4 of the data, with dots marking outliers. Statistics: phylogenetic generalized least squares regression (PGLS); Bonferroni corrected (n = 4), p* < .0125, ** < .0025, *** < .00125. (b) Normalized spectral reflectance measurements of algae (more algae examples shown in Figure S2a[i]), and various backgrounds (coral, rubble, sand, more backgrounds shown in Figure S2a[i]) (data modified from Cheney, 2010 andMarshall, 2000b) (i), and body parts of one exemplary damselfish species reflecting in orange/red (>520 nm) (more species reflecting in orange/red shown in Figure S2[aii]) (ii). (c) Visual models show that adding LWS (going from a trichromat with SWS1, RH2B and RH2A to a tetrachromat with SWS1, RH2B, RH2A and LWS expressed) increases the colour contrast (higher colour JND values) of algae viewed against diverse backgrounds (i) (see also Figure S2b[i] for more visual models), and of red body coloration viewed against other body colours and against ambient illuminant (ii) (see also Figure S2b[ii] for more visual models). Note that adding LWS with a range of 525-565 nm λ max is a result from different (co)expression scenarios: LWS may either be coexpressed with another double cone opsin (RH2s) or solely expressed. discovered that sensitivity to long wavelength (increased lws expression) emerged in association with algivory (omni-and herbivory) only, and that orange/red colour signals emerged after the transition to algal feeding had occurred.
1. In accordance with previous studies (Luehrmann et al., 2018;Stieb et al., 2016Stieb et al., , 2017Stieb et al., , 2019, our transcriptomic analysis revealed that all damselfish species expressed sws1, rh2a, and rh2b, with only a subset of species additionally expressing sws2b and/or lws. Here, gene expression of longer wavelength (as indicated by increased lws expression) opsins is associated both with feeding ecology and coloration (Table S6 summarizes Figure S4b).
While most species within pairs from the other reef fish families (labrids, butterflyfishes, angelfishes, blennies, and surgeonfishes) expressed a core set of the same three opsin genes, they did differ in the expression of additional genes resulting in one species having a short-and the other species having a long-shifted expression profile (Table 1 and Table S3). Here, short-versus long-wavelength shifted opsin combinations covary with feeding ecology and fish coloration as they do for damselfishes. Across families, benthic herbivores had long-wavelength-shifted visual systems with pronounced lws expression: in butterfly-and angelfishes, only herbivores expressed lws; in blennies, surgeonfishes, and labrids, the herbivores expressed higher levels of lws compared to the zooplanktivores. In contrast, for all reef fish families, zooplanktivores expressed a shorter shifted single cone opsin combination compared to herbivores. Importantly, for most within-family species contrasts, the herbivorous species showed an orange/red coloration, while the zooplanktivorous species had no orange/red coloration.
2. By computing a damselfish visual system, our visual models (results listed in Table S7)  and Figure S2b[i]). When comparing fish colours (for orange/redcoloured damselfish species, see Figure 1b[ii] and Figure S2a[ii]; for non-orange/red species, see Figure S2a[iii and iv]), adding the fourth spectral channel mostly improved the contrast of red (Figure 1c[ii] and Figure S2b Table S8. ER was the best fit for our traits in all ancestral reconstructions, except for the reconstruction with trait-dependence between trophic ecology and lws expression, which was better described by ARD ( Figure 2 and Figure S5). Reconstructions with less support are shown in Figures S6 and S7.
Ancestral reconstructions of each individual trait (lws expression, trophic groups, and orange/red colour) are shown in Figure S5 and display similar patterns as the trait-dependent analyses. Ancestral state reconstruction of proportional double cone lws expression as a continuous trait (using BaysesTrait) did differ depending on the prior used ( Figure S8). When assuming an uninformative prior (uniform distribution with lower and upper bounds of 0% and 31%, respectively), the deepest nodes suggest very high upregulation of lws expression, which tends to decrease towards the tips ( Figure S8a). A more constrained prior (exponential distribution with mean equals to 1), produced more similar results to the corHMM reconstructions, with most ancestral nodes showing very low levels of lws expression ( Figure S8b).
When looking at the evolutionary interactions between trophic groups and lws expression, basal nodes showed the lowest lws expression (0%-0.9%), and this low lws expression was either combined with omnivory or herbivory (Figure 2a). Among basal nodes, omnivory was often, herbivory sometimes and zooplanktivory never the dominant state. As omni-and herbivory both include algal feeding, algal feeding with highest probability precedes the emergence or increase of lws expression. Importantly, when reconstructions of internal branches become less ambiguous, we note that zooplanktivory always retained zero to the lowest lws expression levels (e.g., zooplanktivorous species of the genus Chromis or the genus Neopomacentrus).
Herbivory, on the other hand, tends to correlate with higher lws ex- Finally, for the interaction of trophic groups and orange/red colour signals, it is most notable that orange/red colour signals are missing at basal nodes and evolve exclusively on branches reconstructed as subtending algal feeding clades (like the herbivorous Stegastinae and omnivorous Amphiprionini) or first emerge on the tips of the tree, that is., in present-day algal feeding species (Figure 2c). In contrast, omni-and herbivory evolved F I G U R E 2 Ancestral reconstructions under a trait-dependent scenario between trophic groups and lws expression (measured as proportional double cone expression) (a), orange/red coloration and lws expression (b), and trophic groups and orange/red coloration (c). Reconstructions were performed using the R-package corHMM and highest support was given by ARD-all rates differ (a), and ER-all rates are equal (b and c). Phylogenetic tree was reconstructed using a maximum-likelihood damselfish phylogeny (n = 39) sourced and modified from The Fish Tree of Life (Rabosky et al., 2018); support values are given in (a). Note that no genetic markers were available for Parma unifasciata. To still be able to place it in the damselfish phylogeny, markers from Parma oligolepis were used. *Tips with missing data had their state reconstructed.
independently from and before orange/red coloration across the damselfish phylogeny. This is also true for the clades Amphiprionini and Stegastinae in which orange/red colour signals occur early in internal branches but an omnivorous or herbivorous state, respectively, lacking orange/red signals still precedes the origin of the colour signals.

| DISCUSS ION
The mechanisms for shifting spectral sensitivities to long wavelengths in fishes are diverse. Long-wavelength shifts can be achieved by changes in LWS sequence structure (Carleton et al., 2005), a chromophore shift (A1-A2), or may include yellow/ orange carotenoid-based optical filters (de Busserolles et al., 2015;Douglas et al., 1998;Kondrashev, 2008;Saarinen et al., 2012;Siebeck et al., 2003;Terai et al., 2017). This study highlights that in major reef fish families, long-wavelength shifts in visual sensitivity have been achieved by turning on or increasing proportional double cone lws opsin gene expression (simplified as lws expression from now on). An increase in LWS opsin protein implies that more photoreceptors across the retina increase their photon catch at long (red) wavelengths, making them overall more sensitive to red.
While visual models (this study) provide theoretical support that adding LWS increases the fish's ability to detect red signals, only behavioural experiments can directly provide evidence for colour vision and response to red signals.
Here we show that in damselfishes and likely in several other reef fish families, lws gene expression and by virtue long-wavelength-(red)-sensitivity is related to benthic herbivory and orange/red coloration. Moreover, orange/red colour signals only evolved in association with algal feeding. For a summarizing figure with all tested coral reef fish species and traits, see Figure 3.

| Opsin gene expression tuned to feeding ecology: Lws associated with benthic herbivory
Studying 39 damselfish species with representatives from four of the five subfamilies, we found that lws expression was highest in herbivores feeding on benthic algae followed by omnivores.
Sensitivity to either end of the visible spectrum of the light has previously been associated with foraging in various vertebrates. For example, UV-sensitivity in fishes is generally thought to enhance the efficiency of predating on UV-absorbing or scattering zooplankton (Browman et al., 1994;Loew et al., 1993;Rick et al., 2012). Although not all zooplanktivorous reef fishes expressed sws1, they always expressed shorter-shifted single cone opsins (i.e., sws2a instead of sws2b or sws2βa instead of sws2aα) compared to herbivorous species (Table 1 and S3).
In terrestrial forest species, long-wavelength-sensitivity improves distinguishing between items of brown forest litter (Lythgoe & Partridge, 1989). Similarly, long-wavelength-sensitivity in primates helps increasing the contrast of yellow and orange fruit against green foliage (Osorio & Vorobyev, 1996;Regan et al., 1998). Among insects, a shift to longer wavelength sensitivity is associated with shifts in diet and body colour (Martínez-Harms et al., 2012;van der Kooi et al., 2021). In the marine environment, green and brown algae broadly reflect in the green-red range (~500-650 nm) with a secondary, chlorophyll-generated peak in the far-red (> 700 nm, Figure 1b[i] and Figure S2a[i]). Simulations show that to see algae against a typical coral reef background, a reef fish may get away with two photoreceptors sensitive at 510 and 580 nm λ max (Marshall et al., 2003b).
Herbivorous damselfishes seem to approximate this optimum with a RH2A and LWS-based pigment pair that are sensitive to 520 and 560 nm λ max , respectively (Marshall et al., 2006;Stieb et al., 2016).
Indeed, damselfish visual models, including those constructed here, also indicate that the addition of an LWS-pigment increases the detection of algae against diverse backgrounds (Figure 1c[i] and Figure S2b[i]). However, long-wavelength-sensitivity may not only facilitate algal detection but may be beneficial for benthic feeding more generally. For example, lws is highly expressed in several blennies that feed predominantly on detritus or benthic algae .

| Opsin gene expression tuned to fish coloration: Lws associated with orange/red
In addition to feeding ecology, we found that orange/red coloration in damselfish was associated with a change in double cone gene F I G U R E 3 Coral reef fish phylogeny (maximum-likelihood damselfish tree [n = 39] sourced and modified from The Fish Tree of Life [Rabosky et al., 2018] Table S2 for damselfish and Table 1 for remaining coral reef fish families), the presence of yellow (>500 nm) and/or orange/red reflectance (>520 nm) (note that no value means no yellow or orange/red coloration), and the expression of lws (presented as proportional double cone expression, note that no value means no expression). For references on opsin expression, reflectance data and trophic groups for damselfishes, see Tables S2 and S3, for other reef fish species, see Table 1. expression; lws was increased while rh2a reduced in damselfish species (Figures 1a[ii] and Figure S2, Table S6). Similarly, for butterfly-and angelfishes, lws was only expressed in species with orange/red coloration and lws expression was enhanced in the orange-tailed bicolour blenny, Ecsenius bicolor, and the ringtail surgeonfish (it has a yellow/ orange blotch behind the eye), Acanthurus blochii ( Figure 3, Table 1).
The function of orange/red coloration for intraspecific communication and mate choice is known for some freshwater and marine fishes. In Lake Victoria cichlids, different light regimes are associated with divergent visual sensitivities of lws, ultimately contributing to speciation through sensory drive based on sexually selected (red) male breeding coloration (Maan & Sefc, 2013;Seehausen et al., 2008). Across guppy populations, lws coding and expression are associated with red coloration in males (Sandkam et al., 2015), and knocking out lws in medaka (Oryzias latipes) reduces grey-orange colour distinction (Kamijo et al., 2018). All labrids investigated so far express lws with some species expressing up to five copies of the gene (Table 1 and Cortesi et al., 2021;Musilova et al., 2019;Phillips et al., 2016). Since many labrids show complex patterns of coloration dominated by green, red, and far-red components (Marshall et al., 2003b) and some species display sexual dimorphism in (red) coloration (Hodge et al., 2020), long-wavelength-sensitivity in this group is likely to facilitate intraspecific communication at close-range (Marshall, 2000a;Michiels et al., 2008).
In the reef environment, orange/red can become highly conspicuous against water or coral backgrounds near the surface, at least for short-distance viewing, but may help to camouflage against the background or within a group of similarly coloured fishes over longer distances (Cortesi, Feeney, et al., 2015;Marshall, 2000b;Marshall et al., 2003a;Marshall et al., 2019). Our damselfish visual models show that long-wavelength-sensitivity (given by the expression of LWS) increases the colour contrast of orange/red colours when perceived against other fish colours, the ambient illuminant, or specific backgrounds (Figure 1c[ii] and Figure S2b[ii]), which may be advantageous for species recognition and/or mate choice.
Colour patterning has been shown to often be a trustworthy signal for intraspecific communication (Marshall et al., 2006;Sibeaux et al., 2019). Amphiprion biaculatus and Chrysiptera cyanea both exhibit colour patterns visualized with increased contrast when adding long-wavelength sensitivity (Figure 1c[ii] and Figure S2b[ii]). The orange tail of male Chrysiptera cyanea has been related to sexual selection and mating success in this species (Wacker et al., 2016).
Anemonefish have a striking appearance with white stripes and orange/red body colorations and show the highest lws expression among damselfishes (Table S2, Figure 3). Having a cone type containing a long-wavelength-sensitive pigment combined with a relatively short single cone photoreceptor  seems to increase the colour contrast of the striped pattern and thus may be important for conspecific detection and recognition. But seen from a distance through the eyes of (perhaps relatively red-blind) predators, orange-to-red anemonefishes may blend in with their anemone, which is also often red or orange ( Figure S2a[i]).

| The evolution of red sensitivity, body coloration, and herbivory in reef fish
Supporting a scenario in which fish vision, coloration, and trophic ecology are co-evolving, we discovered repeated evolutionary shifts in spectral sensitivity to longer wavelengths (given by increased lws expression) that appeared to be adaptations to algal feeding. Further, we found that orange/red coloration in damselfish is only present in benthic algal feeding species (Figure 1a The sensory drive hypothesis (Endler, 1992;Ryan & Cummings, 2013) suggests that long-wavelength-sensitivity evolved initially in adaptation to feeding strategy, but is now also coevolving with red social signals. It has been suggested, for example, that in primates and guppies, a visual system tuned to find red coloured food is likely to have predated female preference for males displaying red coloration (Endler, 1983;Fernandez & Morris, 2017;Grether et al., 2005;Rodd et al., 2002). In damselfishes, long-wavelength-sensitivity is evolutionarily associated with orange/red coloration and algal feeding, but never with zooplanktivory. Also, long-wavelength-sensitivity can evolve in the absence of orange/red coloration but never in the absence of algal feeding, and benthic algal feeding species have the highest lws expression. Finally, orange/red coloration is exclusively emerging with and most likely after algal feeding. Hence, ancestral state reconstructions suggest that a sensory bias is at play with the following scenario: (1) feeding on algae (but not zooplankton) favours (2) the evolution of long-wavelength-sensitivity (higher lws expression) that (3) is now leading to the evolution of orange/red social signals, which in turn causes selection for (4) increasing lws expression even further.

| CON CLUS IONS
Our results indicate that variation among coral reef fishes in sensitivity to light of longer wavelengths may have evolved as an adaptation to feeding ecology and that, once evolved, it subsequently facilitated the evolution of orange/red fish colour elements, possibly facilitating social signalling. Our study reveals how the evolutionary feedbacks between variation in ecology, here foraging strategy, and social signalling, mediated by variation in visual sensitivity, might help explain the astonishing colour diversity of reef fishes. We call for more behavioural studies to test the predictions that our hypothesis makes with regard to feeding performance and behavioural interactions.

ACK N O WLE D G E M ENTS
We would like to thank the staff at the Lizard Island Research Station for support during fieldwork and acknowledge the Dingaal, Ngurrumungu and Thanhil peoples as traditional owners of the lands and waters of the Lizard Island region. We also thank Cairns Marine for supplying fish, and Janette Edson, Queensland Brain Institute Genomics Facility, for library preparation and sequencing. We are appreciative of the inputs from the Seehausen laboratory, the Fish Ecology and Evolution department meetings at EAWAG, and two anonymous reviewers. to KLC, and by EAWAG.

CO N FLI C T O F I NTE R E S T
The authors declared no conflict of interest for this article.

O PEN R E S E A RCH BA D G E S
This article has earned an Open Data badge for making publicly available the digitally-shareable data necessary to reproduce the reported results. The data is available at 10.5061/dryad. qv9s4 mwgf.

DATA AVA I L A B I L I T Y S TAT E M E N T
Newly generated opsin gene sequences ([data set Stieb, 2021] OK350470-OK350614; see