Colour lightness estimation
The colour lightness of 3,386 anuran species was estimated based on photos and illustrations from 27 amphibian field guides and monographs (for sources and details, see Supplementary Table 1). These literature sources were selected because they cover the entire amphibian fauna of the respective regions. Due to missing distribution maps for several species, our final dataset covered 3059 species. We focused on anurans instead of all amphibian species because the two remaining orders of amphibians differ from frogs and toads in their body shape, distribution, and ecology. Specifically, Caudata (9%) are mostly absent from tropical regions and comprise several semi-fossorial and aquatic species. Gymnophiona (3%) are exclusively distributed in the tropics and are mainly fossorial and aquatic. In contrast, except for Antarctica, anurans occur on all continents and mainly comprise semi-aquatic, terrestrial and arboreal taxa.
To estimate the colour lightness of the dorsal surface of individuals (i.e., the part of the body that is exposed to sunlight) from images, we used a standardised colour wheel with 72 colours (Extended Data Fig. 1). The wheel comprises 18 rays, each consisting of four colours with different saturation levels (S: 10, 40, 70, 100%). In addition to assigning a colour per individual, we also visually estimated the coverage of the colours in 5% steps. To obtain a proxy for melanisation, we calculated the coverage-weighted mean of the red, green, and blue colour channels of the colours of individuals (Extended Data Fig. 1). This average colour lightness value can range from 0 (black) to 255 (white). We did not distinguish between sexes, as they were typically not indicated. Instead, colour lightness values of all available individuals were averaged (morphs and sexes). We chose a visual assessment of colour lightness instead of a digital image analysis to facilitate the exclusion of reflections (wet skin) and shaded areas. Another advantage of visual estimation is that it allows the integration of multiple available sources of in situ images despite differences in the camera–object angle and light conditions (e.g., due to the use of flash). This is particularly important for amphibians, as they fade in colour after their death, impeding the use of the only comparatively rich source of images — material from museum collections — for colour assessments. The main colour assessment was performed by a single person (Ricarda Laumeier). However, a subset of species was also assessed by a second person (Antje Schmidt), and analyses of these data showed high agreement between the assessments (R2 = 0.65, slope ± SE 0.60 ± 0.04, intercept: 24.45, P < 0.001, n = 107; Extended Data Fig. 2). We also acknowledge the systematic observer bias documented by this comparison, which urges the need to align estimates based on species overlap when data assessed by different observers should be integrated.
Distribution data
Vector distribution maps32 for anuran species were reassigned to an equal-area grid (MGRS, cell size of approximately 100 km × 100 km) with functions provided in the R package sf33. Species were scored as present if their ranges covered more than 50% of the cell area. Grid cells that contained more than 50% water were excluded. Distribution data were transformed and mapped to a Mollweide equal-area projection with functions of the R package sp34.
Environmental data
Based on predictions of the thermal melanism hypothesis (colour-based thermoregulation), Gloger’s rule and the UVB protection hypothesis, four environmental proxies for temperature (mean annual temperature (v235), elevation36), productivity (mean annual EVI37), and UVB radiation38 were derived from global high-resolution data. Values for each of these variables were averaged across species’ ranges for species-level analyses and across grid cells of our equal-area grid for assemblage-level analyses.
Phylogenetic autocorrelation
To construct a comprehensive phylogeny for our subset of species, 230 species were added to the currently most complete molecular information39 at the respective genus level, and the intra-genus relationships were randomly resolved with functions of the R package phytools40. Subsequently, species without colour lightness data were pruned from this tree for phylogenetic comparative analyses. We tested for a phylogenetic signal (Pagel’s lambda41) in the colour lightness variation of anuran species using functions of the R package phytools40. To evaluate the phylogenetic uncertainty introduced by the inclusion of species that were added to the original phylogeny, we also calculated the phylogenetic signal based on the original phylogeny only. Because the strength of the phylogenetic signal in colour lightness was similar between the original tree (λ = 0.51) and 10 alternatives of the extended tree [median λ = 0.50], one phylogeny from the set of extended trees was selected for subsequent analyses. Finally, the phylogenetic signal for colour lightness and environmental aggregates were calculated based on one randomly selected tree to test for phylogenetic niche conservatism. Because of this strong impact of the phylogenetic relationship of species, colour lightness was decomposed into its phylogenetically predicted part and the deviation from this prediction using Lynch’s comparative method19. The advantage of this method, compared to merely accounting for phylogenetic autocorrelation, is that it allows separate analyses of the long-term evolutionary (P-component) and short-term (species-specific, S-component) significance of trait–environment relationships.
Spatial autocorrelation
Macroecological patterns typically show spatial autocorrelation (i.e., locations closer together have more similar values than those farther apart), which reduces the effective sample size and thereby leads to false model estimates42. To account for spatial autocorrelation in our models, we repeated assemblage-level analyses with generalized additive models (GAMs) of colour lightness and environmental factors that included a smoothed (trend surface) term of the geographical coordinates of each assemblage using functions of the R package mgcv.
Regression models
Residuals of all models were checked, and if necessary, predictors were transformed to meet the assumption of normality. All analyses were performed with the statistical software R43. Trait–environment relationships were studied at the species and assemblage levels to examine differences in the importance of thermoregulation, UV protection and pathogen resistance between clades and regions in taxonomically and spatially specific contexts, respectively.
Assemblage-level analyses
In assemblage-level analyses, we fitted multiple regressions for the relationships of environmental predictors with ‘raw’ colour lightness, its phylogenetically predicted component, and its species-specific component as well as colour lightness diversity. Assemblages for which colour lightness data were available for less than 33% of species were removed to reduce the effects of incomplete representation (Extended Data Fig. 3), leaving 16,686 of the initial 17,170 assemblages. Colour lightness diversity was calculated as the standardized effect sizes of mean pairwise distances of co-occurring species minus a null model of 1,000 alternative species sets with the same number of species randomly drawn from the species pool of the respective biogeographical realm44. This measure quantifies colour lightness diversity as underdispersed, overdispersed, or randomly dispersed for assemblages with more than one species (n = 14,715). At our coarse grain, underdispersion (negative values) indicates filtering of species by a dominant driver (in our case, a function of colour), whereas overdispersion indicates the presence of multiple concurrent drivers45. For the main assemblage-level analyses, we fitted both multiple linear regressions and a GAM that included a trend surface term to account for spatial autocorrelation. In addition, we assessed regional differences in the relative importance of presumed environmental drivers of the colour lightness and colour lightness diversity of anuran assemblages by repeating our main assemblage-level analysis for the biogeographical realms of amphibians, as identified by Holt et al.44 For these analyses, only assemblages of biogeographical realms with more than 50 assemblages were considered, leaving 13 of 19 realms.
Species-level analyses
To understand differences in the importance of different environmental drivers among major lineages, we repeated the analysis of raw colour lightness, including interactions between all pairs of the environmental predictors and anuran families. In these models, species belonging to families with fewer than 10 species were excluded, which reduced the dataset to 2,984 species (Extended Data Fig. 4). In addition, for each family, the relative contribution of environmental drivers of colour lightness from hierarchical partitioning analysis was plotted against the average absolute latitude of species to assess latitudinal changes in the dominant driver (Extended Data Fig. 5). To test for an effect of activity, we fitted a single regression of colour lightness with the interaction terms of each environmental variable and activity time (diurnal, nocturnal or diurnal and nocturnal) (Extended Data Table 1) for 820 North American and African anuran species.
ONLINE METHOD REFERENCES
19. Lynch, M. Methods for the analysis of comparative data in evolutionary biology. Evolution 45, 1065–1080 (1991).
32. IUCN. The IUCN red list of threatened species. Version 2021-3. https://www.iucnredlist.org (2021).
33. Pebesma, E. Simple features for R: standardized support for spatial vector data. R J. 10, 439 (2018).
34. Bivand, R., Pebesma, E. & Gomez-Rubio, V. Applied Spatial Data Analysis with R (Springer, 2013).
35. Karger, D. N. et al. Climatologies at high resolution for the earth’s land surface areas. Sci. Data 4, 170122 (2017).
36. Robinson, N., Regetz, J. & Guralnick, R. P. EarthEnv-DEM90: a nearly-global, void-free, multi-scale smoothed, 90m digital elevation model from fused ASTER and SRTM data. ISPRS J. Photogramm. Remote Sens. 87, 57–67 (2014).
37. Tuanmu, M. N. & Jetz, W. A global, remote sensing-based characterization of terrestrial habitat heterogeneity for biodiversity and ecosystem modelling. Glob. Ecol. Biogeogr. 24, 1329–1339 (2015).
38. Beckmann, M. et al. glUV: a global UV-B radiation data set for macroecological studies. Methods Ecol. Evol. 5, 372–383 (2014).
39. Jetz, W. & Pyron, R. A. The interplay of past diversification and evolutionary isolation with present imperilment across the amphibian tree of life. Nat. Ecol. Evol. 2, 850–858 (2018).
40. Revell, L. J. phytools: an R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol. 3, 217–223 (2012).
41. Pagel, M. Inferring the historical patterns of biological evolution. Nature 401, 877–884 (1999).
42. Dormann, C. F. et al. Methods to account for spatial autocorrelation in the analysis of species distributional data: a review. Ecography 30, 609–628 (2007).
43. R CoreTeam. R: a language and environment for statistical computing. R foundation for statistical computing. https://www.r-project.org/ (2022).
44. Holt, B. G. et al. An update of wallace’s zoogeographic regions of the world. Science 339, 74–78 (2013).
45. Poos, M. S., Walker, S. C. & Jackson, D. A. Functional-diversity indices can be driven by methodological choices and species richness. Ecology 90, 341–347 (2009).