Introduction

Beetles are the most successful animals on earth; almost one quarter of all living eukaryotes are beetles1. The key to this success is their hardened wings – elytra2,3, which make up the largest exposed surface of their body and can exhibit an extraordinary diversity of optical effects including striking iridescence, gold or silver appearances, mirror-like and pearlescent effects4,5,6. Beetle elytra also exhibit optical properties not observable by most animals such as reflection of near-infrared light (NIR: 700 to 1700 nm)7 and the ability to selectively reflect circularly polarized light6,8,9,10,11. Although there have been attempts to understand the biological significance of these optical effects in some species (reviewed for beetles5,12, for other animals13,14,15,16 and more recently polarization17), we still know very little about the evolutionary drivers for this wide range of optical effects18 in beetles. Phylogenetic comparative studies are needed to identify selective pressures that shape this diversity, but such studies remain rare due to limited phylogenetic and trait information for most beetle groups.

Optical effects produced by beetle elytra can serve multiple functions, some of which are expected to result in correlations with climate. For example, darker organisms or darker species may be found in humid vegetated environments, a pattern known as Gloger’s rule19,20. In these environments, darker colours enhance camouflage due to the dense canopy and dark soils, and the accumulation of melanin may protect against bacteria and parasites19,20,21,22. Conversely, darker organisms may be found in colder regions because absorbing solar radiation can aid warming, a pattern known as Bogert’s rule or the thermal melanism hypothesis23. Higher reflectivity in lighter organisms may be useful in hot, dry climates to avoid overheating24,25,26,27,28. Correlations between coloration and the environment vary, and have been observed both at the inter and intraspecific levels; for example, intraspecific variation in lady beetles follows Gloger’s rule29,30 while variation in Chrysomela lapponica leaf beetles follows Bogert’s rule31. Comparative studies between different species and lineages are important to explore the functions of the astonishing optical effects produced by beetles.

Often, it is difficult to identify the ecological drivers of the variation in optical properties because different selective pressures may produce similar ecogeographical patterns, or because trade-offs in the underlying mechanisms of complex optical properties can obscure large scale patterns. Nevertheless, it is possible to distinguish selection for thermal benefits from selection for other advantages by comparing patterns in different spectral ranges, i.e. UV-Visible from 300 to 700 nm and NIR from 700 to 1700 nm23,32,33,34. This is because absorption or reflection of NIR light, which accounts for 55% of solar radiant energy, affects heat gain but not camouflage or signalling - since it is not visually perceived by animals23,27. For example, a recent phylogenetic comparative analysis in jewel beetles (Buprestidae) considered the two spectral bands separately to show that visible reflectance varies as predicted by Gloger’s rule, while NIR reflectance is correlated with size35. However, there are still very few studies using a comparative approach to test the biological function of diverse optical effects such as NIR reflectance or polarization (but see phylogenetic comparisons for iridescence36,37,38, blue39, white40, super black41, U.V. reflection42 and 3D photonic crystals12), and the correlations between complex optical properties remain unexplored.

In this study, we use a macroecological approach to investigate correlations between optical effects and their associations with ecological variables (such as climate and vegetation) across species within a group of Australian scarabs commonly known as Christmas beetles (Scarabaeidae: Rutelinae). These beetles are an ideal model since they experience a wide range of climatic conditions (Supplementary Figure S1), and exhibit diverse optical effects including iridescent colours, metallic gold, pearlescence, diffuse browns or greens, as well as iridescent and diffuse NIR reflectance7. In addition, the Scarabaeidae family is well known for producing differential reflections of left-handed and right-handed circularly polarized light43. Although linear polarization of light is detected and used by many animals, this is not the case for circular polarization44,45,46,47. Apart from some species of mantis shrimp, no other organism (neither beetles themselves nor their predators) has been conclusively shown to have a visual system capable of decoding the circular polarization of light47,48. Selective reflections of different states of circularly polarized light are almost exclusively found in scarabs (except for one genus of Hybosoridae49,50), but they are present in only 8 out of the 15 subfamilies. Species vary in the proportion of left and right-handed circularly polarized light they reflect (i.e. degree of polarization47,50,51,52).

What could explain the variation in the selective reflections of circularly polarized light in scarabs? These reflections are produced by chitin fibres arranged in chiral or helicoidal structures8,11,43,53,54. Selective pressures related or un-related to the overall appearance of the beetle could affect these structures. Polarized cuticles may be more likely to occur in humid and harsh environments because a chiral structure could provide enhanced mechanical properties and water repellence55,56,57,58. Highly regular chiral structures produce saturated iridescent colours with low reflectance4,59, but the same structures combined with additional elements and specific types of disorder can produce broadband metallic reflectance (characteristic of gold and silver beetles8,60,61,62,63) that could be useful in passive thermoregulation64,65. Furthermore, the relation between the presence of chiral structures and the reflectance of wavelengths beyond the human visible spectrum (including NIR) has not been explored. Thus, polarization could be negatively or positively correlated with environmental variables, but it remains unclear whether there are consistent evolutionary drivers of polarization per se, or whether correlations arise due to the association between polarization and other optical properties.

We tested whether reflectivity and circular polarization properties of 46 species of scarab beetles are associated with environmental variables such as temperature, radiation, humidity, and vegetation cover, after controlling for phylogenetic relatedness. We focussed on a group, commonly known as Christmas beetles, which are smooth, shiny and colourful species belonging to the subtribe Anoplognathina (Tribe Anoploganthini, subfamily Rutelinae, Scarabaeidae). Additionally, we included selected species from the successively more distantly related genera Mimadoretus (Subtribe Schizognathina, tribe Anoploganthini), Anomala (Tribe Anomalini, subfamily Rutelinae) and Xylonichus (subfamily Melolonthinae, Scarabaeidae). This way, our sampling captures the diversity of appearances and light reflection in Australian ruteline scarabs and includes unusual optical properties likely resulting from independent evolutionary origins. To distinguish the importance of different selective pressures, particularly the role of selection for thermoregulatory benefits, we considered reflectivity in three different wavelength ranges, visible: 400 to 700 nm, NIR: 700 to 1700 nm and broadband: 400 to 1700 nm. In addition, we tested for correlations between the degree of circular polarization and reflectivity as well as ecological variables. We included body size as a covariate and also tested its correlation with climate because it can modulate optical effects23,66 and it is often shaped by climate67. We show how knowledge of ecological drivers and phylogenetic history of multiple species with different mechanisms of producing structural colour can be used to inform species selection in biophysics and biophotonics studies into the function of structural colours.

Results

Diversity and phylogenetic signal

Since there is no published molecular phylogeny for Rutelinae, we obtained a consensus phylogenetic tree (maximum clade credibility (MCC) tree; Fig. 1; for details see supplementary procedures 3) and a sample of 1000 trees from the Bayesian posterior distribution. All correlations were calculated for the MCC tree, while the confidence intervals were estimated using the sample of 1000 trees.

We confirmed a great diversity in reflectivity in three spectral bands: visible (VIS, 400–700 nm), near infrared (NIR, 700–1700 nm) and broadband (TOT, 400–1700 nm), and degree of polarization in the studied beetles (Fig. 1). These traits appear to cluster according to phylogeny, indicated by the high phylogenetic signal: Pagel’s lambda ranged from 0.81 to 0.97. Phylogenetic signal was notably high for NIR reflectivity (0.93) and degree of circular polarization (0.95) (Supplementary Table S3). We measured the degree of circular polarization by comparing reflectance through left-handed (LCP) and right-handed (RCP) circularly polarized filters (Fig. 1). Beetles showed varying reflectance under the RCP filter, which can serve as a proxy for pigment accumulation in the elytra. This is because the RCP filter blocks the reflections arising from the chiral structures, revealing light reflection or absorption by deeper components in the cuticle (Fig. 1).

Fig. 1
figure 1

Optical properties mapped onto the consensus tree for the studied beetles. Colored squares (heat map) represent the analyzed optical properties, corresponding to the diagrams in the inset (lower-right). Calibrated photographs of select species illustrate the diversity observed. We analyzed reflectivity in visible (VIS), near-infrared (NIR residuals – see rationale in supplementary figure S2) and their sum (TOT). We considered two polarization traits (see rationale in supplementary figure S3): degree of polarization (POL), and the negative of the relative reflectance in right-handed polarization as a proxy for the presence of pigments (-RCP). Species marked with circles in the NIR column have high NIR reflections due to a unique bi-layer68. The NIR mechanisms in the other species of this group have not been investigated. The tree is a MCC consensus used for illustration (See Supplementary Figure S4 for information on node support and topological constraints involved in the full set of sample trees used for comparative analysis).

Correlations between optical properties, body size and climate

Variation in climate was summarized into two PC components: Lower PC1 values indicate humid environments with more clouds and vegetation, while lower PC2 values indicate hotter, arid environments with more solar radiation (Supplementary Figure S5). Visible and NIR reflectivity showed opposite trends in their relationships with climate, which explains why neither of the climate principal components nor body size predicted reflectivity across the full solar spectrum (Supplementary Table S4 and S6). Overall, larger beetles occurred in drier environments with less vegetation cover (Fig. 2a; PC1 MCC estimate = 0.088; C.I. 0.069 — 0.097; p = 0.009; C.I. 0.005 — 0.019; trees with p < 0.05 = 99.6% and PC2 MCC estimate = -0.054; C.I. -0.063 — -0.048; p = 0.109; C.I. 0.029 — 0.144; trees with p < 0.05 = 6.7%). The degree of polarization was predicted by humidity (Fig. 2b; MCC estimate = -0.026; C.I. -0.028 — -0.023; p = 0.005, C.I. 0.002 — 0.009; trees with p < 0.05 = 100%; Supplementary Table S6) but this correlation was not very robust to the inclusion of additional predictors in the models (see results including interaction terms in Supplementary Table S5). Conversely, the relative RCP reflectance (a proxy for pigments) was not predicted by either climate or size (Supplementary Table S6). The degree of polarization did not vary considerably between the pronotum and elytron within the same individual (Paired t test, t = -1.2468, df = 173, p-value = 0.2142).

Fig. 2
figure 2

The importance of humidity. (a) Larger beetles occur in drier environments with less vegetation cover. (b) Beetles possessing highly efficient chiral structures (degree of left-hand circular polarization) occur in more humid environments. However, this result is not supported by more complex models including the interaction terms (see supplementary table S5). The plots show the mean and standard deviation (error bars) for each variable, with the negative of PC1 plotted in the x-axis for easier interpretation. Trend lines were generated from PGLS model estimates, and each data point is labeled with a species code, which is referenced in the supplementary materials.

Visible reflectivity was predicted by the interaction between climate PC1 (humidity) and body size, (MCC estimate = 2.552; C.I. 2.209 — 3.263; p = 0.017; C.I. < 0.001 — 0.053; trees with p < 0.05 = 93.06%; Supplementary Table S6). Smaller beetles tended to be lighter (higher visible reflectivity) in more humid environments (Fig. 3a) while larger beetles tended to be darker in more humid environments (Fig. 3b).

Fig. 3
figure 3

Effects of the interactions between climate and size on reflectivity. Trend lines were calculated based on the estimates of the PGLS models but only the correlations with p-value < 0.05 in the MCC tree are shown (Supplementary 6). The negative of the principal components is plotted for easier interpretation. PC2 was fixed at the mean value for all beetles in (a) and (b) while PC1 was fixed at the mean value for all beetles in (c) and (d). For visualization, species are divided into those smaller and larger than the mean body size (2.25 cm). The plots show the mean and standard deviation (error bars) of the studied optical properties and PC values per species. NIR reflectivity is given as the residuals of a simple linear model with visible reflectivity as a predictor for visualization purposes. PGLS analyses excluding the species circled in (c) and (d) did not show any correlation between temperature and NIR reflectivity (Supplementary Table S5 and S6).

NIR reflectivity was predicted by an interaction between climate PC2 and body size (MCC estimate = -4.531; C.I. -5.487 — -4.175; p = 0.010; C.I. < 0.001 — 0.008; trees with p < 0.05 = 100%; Supplementary Table S4 and S6) indicating that, Contrary to Bogert’s rule, for smaller species, those with higher NIR reflectivity occurred in cooler environments (Fig. 3c and d). However, this pattern was largely driven by Anoplognathus prasinus and Xylonichus sp., which have exceptionally high NIR reflectivity (circled in Fig. 3c and d, locations in Supplementary Figure S6). When excluding these species, the support for interaction between climate PC2 and body size depended on phylogenetic uncertainty (MCC estimate = -2.615; C.I. -2.977 — -2.155; p = 0.041; C.I. 0.014 — 0.088; trees with p < 0.05 = 57.48%; Supplementary Table S6).

Correlations between polarization variables and reflectivity

The degree of polarization was negatively correlated with reflectivity in the NIR (Fig. 4; Supplementary Table S7). The pattern persists even after excluding the species with high NIR reflectance: Xylonichus sp., A. prasinus, P. olivaceous, P. ocularis and P. prasinus (MCC estimate = -20.184; C.I. -20.184 — -19.445; p = < 0.001; C.I. <0.001 — <0.002; trees with p < 0.05 = 100%; Supplementary Table S6). Therefore, most beetles that lack polarizing nanostructures have high NIR reflectivity. Although highly regular structures are expected to produce saturated colours within a limited range of wavelengths4,59— resulting in less light reflected across the full spectrum and thus lower reflectivity — we found no correlation between the degree of polarization and visible reflectivity (Fig. 4, MCC estimate = 8.538; C.I. 1.784 — 12.115, p = 0.339; C.I. 0.123 — 0.786; trees with p < 0.05 = 0%; Supplementary Table S7). This means that the chiral nanostructures in this group of beetles can produce highly saturated colours in some species and broadband reflectance in others.

Fig. 4
figure 4

Correlations between the degree of polarization and beetles’ reflectivity. Larger values in the degree of polarization indicate a dominant effect of left-handed chiral structures. The visible reflectivity is independent of the presence of highly efficient chiral structures (a) while the residuals of NIR reflectivity (extracted from a NIR-VIS regression to account for the correlation) are 0 or higher in beetles that lack efficient left-handed chiral structures (b). This pattern remains even after removing the species with a bilayered mechanism (squares) from the analysis. Plots show the mean and standard deviation (error bars) of the studied optical properties per species. Trend lines were calculated based on the estimates of the PGLS models.

Our results suggest that species with lower reflectivity had a higher contribution of pigments (Fig. 5). This is supported by a correlation between the relative reflectance in the RCP filter and VIS reflectivity (MCC estimate = 2.488; C.I. 2.325 — 2.675; p = < 0.001; C.I. <0.001— <0.001; trees with p < 0.05 = 100%). However, no such correlation was found for NIR reflectivity due to conflicting results across different models (Supplementary Table S7). Some species with low visible reflectivity, and thus potentially a higher concentration of pigments—or more absorbing pigments—still appear vividly coloured to the human eye, likely due to the saturated colours produced by nanostructures (Fig. 5).

Fig. 5
figure 5

Correlation between potential pigment accumulation and visible reflectivity. We considered the mean RGB values under the RCP filter to be inversely proportional to the amount of pigment in the elytra. Beetles with lower reflectance in the RCP filter potentially accumulate more pigments, yet their overall appearance (no filter) remains diverse thanks to the chiral nanostructures. Beetles are not scaled proportionally to their original size. Error bars indicate mean and standard deviation of the two variables per species. Trend line calculated based on the estimates of the PGLS models.

Discussion

The striking optical effects produced by Australian ruteline beetles appear to arise from complex interactions between ecological variables, reflectivity, and polarization, rather than being determined by a universal ecogeographical pattern. We found that humidity was correlated to size, visible reflectivity and the presence of chiral nanostructures (degree of circular polarization), while environmental temperature had little impact on optical properties. Climate variables did not explain reflectance in right circular polarization - a proxy for pigment accumulation, nor NIR reflectivity. More specifically, larger beetles occurred in drier environments and followed Gloger’s rule (darker in more humid environments); yet small beetles followed the opposite pattern. Contrary to Bogert’s rule (thermal melanism – darker in colder environments), species with higher NIR reflectivity occurred in cooler environments, though this pattern was largely driven by few species. Our study is the first to systematically explore the correlation between reflectivity and polarization in beetles, revealing two key patterns: the presence of chiral nanostructures (degree of circular polarization) was associated with lower NIR reflectivity, and visible reflectivity was reduced by pigments (estimated based on the right circular polarization) but independent of chiral nanostructures. Our results suggest that the interplay between structures and pigments can create complex patterns of geographical variation. Even though reflectivity and polarization are constrained by phylogeny, the patterns we detected can inform future studies on the mechanisms, functions, and evolution of light manipulation in beetles.

Ecogeographical rules to explain inter and intraspecific colour variation have been formulated mainly based on the properties of pigment-based colours – mostly melanin – thus it remains unclear whether variations in structural colour follow similar patterns. Melanin is a broadband absorbing pigment with multiple functions69,70. Melanin can facilitate absorption of radiative energy (Bogert’s rule), protect against pathogens and predators (Gloger’s rule), prevent desiccation (melanin-desiccation hypothesis) and absorb harmful ultraviolet light (ultraviolet protection hypothesis)23,24. However, for organisms that use structural colour, measurements of darkness or lightness may not correspond directly with melanin content20,71. The overall optical effects that correlate with ecological variables are produced by different interactions between pigments and structures72. For example, birds produce both dark and bright colours with pigments — melanin37,73, insects can use nanostructures to enhance reflection of solar radiation64 or trap light to absorb energy (green and white butterflies74,75), and chameleons have different layers of structures to manipulate visible and NIR light separately76. Christmas beetles seem to combine pigment and structural colours in their elytra, which could enable more flexibility to manipulate light in the NIR and visible spectral bands. Thus, the correlations we observed may be the result of species-specific combinations of selective pressures driving the evolution of both structures and pigments.

Water balance may be an important selective pressure driving variation in body size and visible reflectivity in Christmas beetles. We found a negative correlation between size and humidity, which is expected in insects (converse Bergmann’s rule67,77) because larger individuals can resist resource shortages, and lose less water due to their small surface area : volume ratio and thicker boundary layers78,79,80. Similar results have been found in grasshoppers and seed-feeding beetles79,81,82. Larger beetles living in dry environments were also more reflective in the visible range. Increased reflectivity in dry environments may be a consequence of limited food sources since melanin production in insects is costly and affected by diet83,84. Alternatively, it may counteract thermal disadvantages of large body size, specifically lower evaporative heat loss and greater thermal inertia80,85,86,87. Finally, higher reflectivity in dry environments may be associated with camouflage because substrate colour is often lighter in drier environments21,88,89,90,91. Not all beetles follow the same patterns: small jewel beetles (Buprestidae) adhere to Gloger’s rule35, but small beetles in our study showed the opposite trend. Jewel beetles are active in spring and perch on flowers, while many species of Rutelinae (such as Christmas beetles - Anoplognathini) are active in summer and are ground dwellers or perch in eucalyptus trees92. Thus, small Christmas beetles could be at stronger risk of desiccation and may accumulate melanin to resist it24,84,93,94,95 becoming darker in drier environments. Other studies have highlighted that, for insects, humidity can sometimes have a stronger correlation with body size and colouration than temperature96,97, which is consistent with our findings.

A correlation where beetles with chiral structures occur in humid environments may seem counterintuitive at first, but it deserves further exploration. Typically, organisms rely on superficial 3D structures to create air gaps between the surface and potential water droplets enabling hydrophobicity and self-cleaning98,99, but chiral nanostructures in scarabs are placed beneath the epicuticle and cuticular wax11 – i.e. not in direct contact with water droplets. Structural colours are linked to enhanced hydrophobicity when they are produced by structured surfaces, as seen in butterflies, mosquitoes and true bugs13,98,100, but reduced hydrophobicity when they are produced by flat, ordered multilayers beneath the surface, such as in bird feathers101. Nonetheless, beetles’ tribological properties and wettability are determined by both the superficial microstructures and the chemical properties of the cuticle and waxes102,103,104. Future studies could evaluate if the chemistry of the chiral materials enhances hydrophobicity or enables easy assembly of cuticles with highly irregular surfaces, particularly for those species with chiral structures that live near riverbanks and lay their eggs in sand105,106, where antifriction properties are likely relevant58,103,104. Even if chiral fibers are not particularly hydrophobic, they may offer high resistance, flexibility, and durability107, which could be beneficial in humid environments with diverse vegetation and structured landscapes, and where the risk of desiccation is low. Beyond its role in cuticular chemical assembly and pigment accumulation99,108, high humidity has been shown to improve the assembly and reflectance of chiral nanoparticles due to slower drying109. Given the multifunctionality of beetle elytra58,103, the numerous ways to modulate hydrophobicity or hydrophilicity, and the chemical properties of beetle cuticles, the correlation between humidity and the presence of chiral nanostructures in Christmas beetles as well as its bioinspiration potential should be investigated110.

Our results suggest that environmental temperature is not a strong selective pressure driving interspecific variation in reflectivity among the studied species. Although reflectivity affects heat gain of elytra in Christmas beetles65, we did not find a strong correlation between relative NIR or total reflectivity and environmental temperature. These results differ from other studies demonstrating that annual mean temperature is associated with colour variation in birds26,111,112, heliothermic lizards113, dragonflies114,115, lady beetles116, Andean, European and Australian butterflies25,111,117,118. Our results are surprising considering that small ectotherms depend more strongly on solar energy than endotherms119. However, recent studies have shown that lightness/darkness patterns driven by humidity or photoprotection can override the effects of temperature120,121. Our results could be explained by opposite gradients of humidity and temperature that create conflicting ecological challenges for some Christmas beetle species121. Alternatively, Christmas beetles may have physiological or behavioural strategies for thermoregulation that reduce the importance of reflectivity for regulating body temperature86,96,122,123,124. We emphasise that the species with extremely high NIR reflectivity and high NIR absorptivity produced with a bilayer mechanism (genus Xylonichus and Paraschizognathus, as well as Anoplognathus prasinus)68 cluster in cooler environments (eastern coast of New South Wales, Supplementary Figure S4). Additional studies could compare the microhabitat of these species to identify the reasons behind this pattern. Thermoregulation in Christmas beetles may include diverse behavioural, physiological and ecological adaptations, such as activity periods, feeding habits and microhabitat choice, which may not result in general correlations with environmental temperatures.

We found a trade-off between the degree of reflected circular polarization of visible light and NIR reflectivity likely related to the underlying mechanisms. Beetles with highly polarized – highly saturated visible reflectance are expected to have low NIR reflectance, since their structures are ordered and tuned for a specific narrow wavelength band. However, our sample included species with a much wider range of optical properties than highly saturated narrow-band reflectance, and the correlation persisted even after accounting for the correlation between VIS and NIR reflectance. Non-polarized beetles in our sample showed high NIR reflectivity even after excluding species with bilayered NIR reflective structures from the analyses. It is possible that beetles without chiral nanostructures have an undiscovered mechanism that increases their NIR reflectivity. Furthermore, our results suggest that this mechanism is unlikely to co-occur with chiral nanostructures, even though multicomponent photonic structures are common in nature72,125. The combination of iridescence and high NIR reflectance in A. flavipennis (formerly A. brunnipennis126), A. roseus, A. laetus, A. parvulus and A. aureus7, is a remarkable exception to the expected trade-off between structural colour in visible and NIR wavebands, which has been observed in sunbirds and jewel beetles35,127, and deserves further exploration.

How labile are optical effects? Structural colouration has been proposed as a driver of diversification because of its high lability, since subtle modifications in the spacing or shape of the nanostructures can create wildly different optical effects128,129. However, structural colour may also be phylogenetically conserved due to the to the developmental and physiological mechanisms needed to produce nanostructures as a novel trait in the phylogeny12,130,131 or because once self-assembly mechanisms have arisen, they are retained due to the low energy involved in their development132,133. In Christmas beetles, the reflectivity and degree of circular polarization in the reflections are phylogenetically constrained, but other optical effects such as iridescence, specularity and spectral location are not strongly correlated with the properties measured here and vary greatly even at the intraspecific level7. These effects could be under different selective pressures and may be more labile. Notably, NIR reflectivity and polarization - a hallmark of chiral nanostructures in beetles5 - showed higher phylogenetic signal than visible reflectivity. This may be due to stronger selection on visible appearance and evolutionary constraints on developing the fundamental building blocks of structural colour such as chiral structures that produce circular polarization.

The extraordinary diversity of optical effects in Christmas beetles has likely arisen from multiple species-specific selective pressures. Therefore, in order to understand the evolution of complex and diverse optical effects in beetles, our results should be complemented with data on the biology of each species, for example the types of vegetation they feed on, their habitats and body temperature at different times of the day. Nevertheless, our macroecological analysis suggests that water availability may be an important ecological challenge for Christmas beetles. It also highlights the complex interplay between structural and pigment-based colours in determining ecogeographical trends; for example, the use of circular polarising filters enabled us to distinguish the contribution of chiral structures and the accumulation of broadband pigments - likely melanin69,70,134. Our results show that phylogenetic comparative studies provide a useful starting point to investigate the relationship between photonic structures and their biological function, and to identify ‘special cases’ worthy of further structural and optical characterisation.

Methods

Specimen selection

In Australia, the common name “Christmas beetle” refers to scarabs from the genus Anoplognathus, but this genus does not appear to be monophyletic and the name can more broadly refer to species in the subtribe Anoplognathina, which are all relatively smooth, shiny and often colorful species126. These should not be confused with lucanid beetles from the genus Lamprima, which are also metallic, colorful and active during the Christmas season, and are therefore occasionally called Christmas beetles.

In this study, we examined 261 specimens, representing 53 morphs from 46 species of beetles from the subfamily Rutelinae. Our sample comprehensively covered species from the genera Anoplognathus, Calloodes, Repsimus, Epichrysus, Anoplostethus, and Paraschizognathus, all belonging to the subtribe Anoplognathina (tribe Anoplognathini). Additionally, we included Mimadoretus (subtribe Schizognathina, tribe Anoplognathini), Anomala (tribe Anomalini) and Xylonichus (subfamily Melolonthinae) as successively more distantly related representatives (supplementary table S8). Outside of Anoplognathini, our sample was restricted to only one additional ruteline species due to limited availability of suitable museum samples. The inclusion of Xylonichus sp. is particularly informative, as it exhibits similar unusual optical characteristics that likely originated independently to Anoplognathus prasinus in relatively similar habitats (see Supplementary Figure S6 and interactive Supplementary Table S1 in our code).

Reflectivity

Based on spectrometry measurements, we calculated the reflectivity of 261 individuals (46 species) as the ratio of total light reflected by the elytra (for details on the spectral measurements see supplementary procedures 1) to the total incident radiation (solar irradiance spectrum), integrated over the wavelength range of interest (%)7,65,135, i.e. visible (VIS, 400–700 nm), near infrared (NIR, 700–1700 nm) and broadband (TOT, 400–1700 nm). We decided to focus on reflectivity because it is expected to vary according to climate, whereas chromatic properties (i.e. hue, saturation or spectral shape) are likely driven by camouflage or signaling13,72,136,137. These properties, though interesting, were outside the scope of this study.

Given our previous work showed that absorptivity is a strong predictor of the temperature increase of elytra65, we examined the correlation between climate and absorptivity in a subset of 56 of the individuals (28 species) correspondent to the data from Ospina-Rozo, et al.65. Results were qualitatively similar to those for reflectivity or did not show additional patterns. (Supplementary procedures 5, supplementary Figure S7 and Tables S11 – S12).

Circular polarization

To estimate polarization properties, we extracted the linearized and equalized RGB values from calibrated photographs taken with a modified digital SLR camera and broadband transmissive lenses following the procedure described in Munro, et al.25 (For details see Supplementary Fig. S2, Supplementary procedures 1 and our code). For each specimen we compared three photos: one obtained with the visible filter only, one through the visible filter coupled to a left-handed circular polarizer (LCP), and one through the visible filter coupled to a right-handed circular polarizer (RCP). This set up captures the circular polarization of light in the visible range of the spectrum, but not in the NIR long wavelengths.

In our study, high reflectance through the left-handed polarized filter (LCP) indicates a dominant influence of left-handed chiral structures, while low reflectance through the right-handed polarized filter (RCP) can be related to absorption by pigments. This is because typically the chiral nanostructures in scarabs reflect left-handed polarized light53,54,55 with some exceptions8,51 which are not included in our samples. Low reflectance in the RCP filter is likely associated to the presence of pigments because on average Christmas beetle elytra transmit only 5.59% of visible light while absorbing 81.55% (Supplementary Figure S5 calculated from data in Ospina-Rozo, et al.65). Although this can vary between species and structural absorption can also occur, the brown and black appearances observed in the RCP filter (Fig. 1) have been associated with different types and amounts of melanins5,134,138, which are large and highly stable polymers unlikely to degrade in museum conditions138,139,140,141.

We standardised the reflectance in the LCP filter by calculating the degree of circular polarization (Stokes parameter S3142) with Eq. (1), where \({R}_{l}\) is the average reflectance in the LCP filter and \({R}_{r}\) is the average in the RCP filter.

$$P= \frac{{R}_{l}-{R}_{r}}{{R}_{l}+{R}_{r}}$$
(1)

A larger value in the degree of polarization arises due to a larger difference in RGB values between the LCP and RCP filters. This indicates higher efficiency of the chiral mechanism, since a greater proportion of light is reflected by the left-handed chiral structures. We used the relative right-handed reflectance (mean of raw RGB values in the RCP filter) as a coarse measure of pigment absorption.

Body size

From the calibrated photographs taken in the previous step we obtained the length of each beetle based on the reference scale in ImageJ V1.52a143. This measurement is a good proxy for body size in Christmas beetles since their shape is very conserved126.

Climate data

Although Christmas beetles are famous for being active only during the warmest months, i.e. December through January144 some species sampled in this study differ in their activity periods105. Additionally, they are found in environments with a wide range of humidity, solar radiation and temperature145,146 (Supplementary Figure S1). Therefore, we collected climate data (AGCD/AWAP database) for each specimen locality during the months of peak activity for the correspondent species (ALA records).

Due to the multivariate nature of the climate, we used a principal component analysis (PCA) as a variable reduction tool26,147, which resulted in two climate components that explained 82% of the variability in the data (Supplementary Figure S3). In this analysis we kept only seven ecological variables that were representative of the differences between samples’ locations and did not have correlations with Pearson’s R2 > 0.8 (Supplementary Table S2): maximum temperature(°C), number of days above 35 °C, solar radiation (kJ × m− 2 × day− 1), cloud cover (yearly mean %), rain (mm/day), water vapour (hPa) and aridity (as the negative of the mean annual aridity index to facilitate interpretation). Overall, lower PC1 values represented humid environments with more clouds and vegetation coverage, while lower PC2 values represented hotter, more arid environments with more solar radiation (Supplementary Figure S3, supplementary procedures 2, and our code).

Phylogenetic inference

Since there is no published molecular phylogeny for Rutelinae, we assembled an ultrametric tree from genetic data previously generated by AM and CAMR to account for phylogenetic relatedness in our comparative analyses. We compiled a species-level supermatrix of genetic data using (i) published COI data148 and (ii) additional information and data149 via sequence downloaded from NCBI (https://www.ncbi.nlm.nih.gov/). This supermatrix was carefully curated according to expert concept on taxonomy and sample identity, which resulted in a final datamatrix of three genes (28s, 16s, COI), then subjected to Bayesian phylogenetic analysis – BEAST150. From this analysis, 1300 posterior sample trees were drawn to account for uncertainty in node ages and topology (summarised as a maximum clade credibility - MCC tree in Fig. 1). Details of phylogenetic reconstruction are provided in supplementary procedures 3 and supplementary Table S7.

Phylogenetic comparative analysis

We used a combination of phylogenetically controlled models to evaluate if the optical properties in the Christmas beetles’ elytra - reflectivity and polarization - can be predicted by climate and body size. We also used this method to test for correlations between optical properties. Although all our variables were measured on multiple individuals per species, it was not our aim to test if climate or size can predict the intraspecific variability in optical properties. Instead, we averaged the data for each variable per species and conducted our analysis at the species level. Our broad sampling accounted for geographic variation evident in widespread species as well as variation across multiple years and fluctuating activity periods151.

We used a phylogenetic generalised least squares regression (PGLS) model on the MCC tree and accounted for phylogenetic uncertainty by also fitting the PGLS model to a subset of 1001 trees from the posterior distribution. In some cases, models could not be fitted to a small number of the trees due to convergence issues associated with those particular trees; however, all models were fitted to > 960 trees (see Supplementary table S4 for the precise number of trees for each model). To test the amount of phylogenetic signal in the optical properties (reflectivity in the three studied spectral ranges, as well as circular polarization in the visible range), we used Pagel’s lambda, with higher values (closer to 1) representing traits with high phylogenetic signal (detailed results in Supplementary Table S3).

To test the correlation between climate and reflectivity, we ran three separate phylogenetically controlled models, one for each spectral range: visible (VIS), near-infrared (NIR) and broadband (the sum of the previous two), considering as predictors two climate principal components (PC1 and PC2), body size, and the interactions between body size and climate PCs. We excluded interaction terms when not significant to simplify models. The optical properties in the visible and NIR are correlated since they belong to a continuous spectrum. To account for this, we included VIS reflectivity as a predictor in all models where NIR reflectivity was the response variable. We tested an extra set of models where the response variable was the residuals from a correlation between visible and NIR optical properties but found no difference between these two types of models (further details in Supplementary procedures 4). To evaluate if body size correlates with climate, we ran a separate PGLS considering body size as the response variable and the two climatic principal components PC1 and PC2.

To test if the degree of left-handed circular polarization is correlated to any of our ecological variables or size, we ran a PGLS using the following as predictors: two climate principal components (PC1 and PC2), body size, and the interactions between body size and climate PCs. We also ran a PGLS regression to evaluate if the degree of polarization of the reflected light in the visible range can predict the total amount of light reflected in the visible and NIR spectral bands.

Several species, namely Anoplognathus prasinus and the species belonging to the genus Xylonichus and Paraschizognathus, had unusually high NIR reflectance. These species have a special bi-layered photonic mechanism which enhances NIR reflectance68. To evaluate whether these species had a disproportionate effect on observed trends, we repeated all the aforementioned analyses without these species (results in the supplementary Tables S4, S5, S6, and S7).

All our models were run in R Statistical Software V4.1.2152. To run PGLS models we used the packages ape153, caper154, picante155 and phytools156. In order to run the PGLS model on multiple trees, we used loop functions programmed in R following Medina, et al.26. We report the 95% intervals for both the estimate and p-value obtained from the iterations of fitting the model to multiple phylogenetic trees. To ensure that our models meet the assumptions of normality and homoscedasticity in the residuals we examined the diagnostic plots for the residuals. We consider p-values to be a continuous measure of statistical evidence rather than a binary significance cut-off157,158,159. We report the main results for the PGLS models following the notation: MCC estimate = 1; C.I. -2 — 2; p = 0.01; C.I. − 0.02 — 0.02; trees with p < 0.05 = 90% (arbitrary values added to illustrate the system) where MCC estimate denotes the values obtained from the models in the MCC tree, p refers to p-value and C.I. indicates the confidence intervals160 around the estimate and p-value respectively.