1. Clusella Trullas, S., van Wyk, J. H. & Spotila, J. R. Thermal melanism in ectotherms. J. Therm. Biol. 32, 235–245 (2007).

2. Pinkert, S. & Zeuss, D. Thermal biology: melanin-based energy harvesting across the tree of life. Curr. Biol. 28, R887–R889 (2018).

3. Stuart-Fox, D., Newton, E. & Clusella-Trullas, S. Thermal consequences of colour and near-infrared reflectance. Phil. Trans. R. Soc. Lond. B 372, 20160345 (2017).

4. Delhey, K., Dale, J., Valcu, M. & Kempenaers, B. Reconciling ecogeographical rules: rainfall and temperature predict global colour variation in the largest bird radiation. Ecol. Lett. 22, 726–736 (2019).

5. Abram, P. K. et al. An insect with selective control of egg coloration. Curr. Biol. 25, 2007–2011 (2015).

6. Torres-Campos, I., Abram, P. K., Guerra-Grenier, E., Boivin, G. & Brodeur, J. A scenario for the evolution of selective egg coloration: the roles of enemy-free space, camouflage, thermoregulation and pigment limitation. R. Soc. Open Sci. 3, 150711 (2016).

7. Kilner, R. M. The evolution of egg colour and patterning in birds. Biol. Rev. Camb. Phil. Soc. 81, 383–406 (2006).

8. Webb, D. R. Thermal tolerance of avian embryos: a review. Condor 89, 874–898 (1987).

9. Boulton, R. L. & Cassey, P. How avian incubation behaviour influences egg surface temperatures: relationships with egg position, development and clutch size. J. Avian Biol. 43, 289–296 (2012).

10. Hanley, D., Grim, T., Cassey, P. & Hauber, M. E. Not so colourful after all: eggshell pigments constrain avian eggshell colour space. Biol. Lett. 11, 20150087 (2015).

11. Gorchein, A., Lim, C. K. & Cassey, P. Extraction and analysis of colourful eggshell pigments using HPLC and HPLC/electrospray ionization tandem mass spectrometry. Biomed. Chromatogr. 23, 602–606 (2009).

12. Gómez, J. et al. A trade-off between overheating and camouflage on shorebird eggshell colouration. J. Avian Biol. 47, 346–353 (2016).

13. Westmoreland, D. Evidence of selection for egg crypsis in conspicuous nests. J. Field Ornithol. 79, 263–268 (2008).

14. Westmoreland, D. & Best, L. B. Incubation continuity and the advantage of cryptic egg coloration to mourning doves. Wilson Bull. 98, 297–300 (1986).

15. Verbeek, N. A. M. Differental predation on eggs in clutches of northwestern crows: the importance of egg color. Condor 92, 695–701 (1990).

16. Castilla, A. A. M., Dhondt, A. A., Díaz-Uriarte, R. & Westmoreland, D. Predation in ground-nesting birds: an experimental study using natural egg-color variation. Avian Conserv. Ecol. 2, 2 (2007).

17. Yahner, R. H. & Mahan, C. G. Effects of egg type on depredation of artificial ground nests. Wilson Bull. 108, 129–136 (1996).

18. Lahti, D. C. & Ardia, D. R. Shedding light on bird egg color: pigment as parasol and the dark car effect. Am. Nat. 187, 547–563 (2016).

19. Westmoreland, D., Schmitz, M. & Burns, K. E. Egg color as an adaptation for thermoregulation. J. Field Ornithol. 78, 176–183 (2007).

20. Ruxton, G. D. Comment on ‘Vegetation height and egg coloration differentially affect predation rate and overheating risk: an experimental test mimicking a ground-nesting bird’. Can. J. Zool. 90, 1359–1360 (2012).

21. Troscianko, J., Wilson-Aggarwal, J., Stevens, M. & Spottiswoode, C. N. Camouflage predicts survival in ground-nesting birds. Sci. Rep. 6, 19966 (2016).

22. McKinnon, L. et al. Lower predation risk for migratory birds at higher latitudes. Science 237, 326–327 (2010).

23. Kubelka, V. et al. Global pattern of nest predation is disrupted by climate change in shorebirds. Science 362, 680–683 (2018).

24. Remeš, V., Matysioková, B. & Cockburn, A. Long-term and large-scale analyses of nest predation patterns in Australian songbirds and a global comparison of nest predation rates. J. Avian Biol. 43, 435–444 (2012).

25. Mayani-Parás, F., Kilner, R. M., Stoddard, M. C., Rodríguez, C. & Drummond, H. Behaviorally induced camouflage: a new mechanism of avian egg protection. Am. Nat. 186, E91–E97 (2015).

26. Ishikawa, S. et al. Photodynamic antimicrobial activity of avian eggshell pigments. FEBS Lett. 584, 770–774 (2010).

27. Ruiz-de-Castañeda, R., Vela, A. I., Lobato, E., Briones, V. & Moreno, J. Bacterial loads on eggshells of the pied flycatcher: environmental and maternal factors. Condor 113, 200–208 (2011).

28. D’Alba, L. & Shawkey, M. D. Mechanisms of antimicrobial defense in avian eggs. J. Ornithol. 156, 399–408 (2015).

29. M’Aldowie, A. M. Observations on the development and the decay of the pigment layer in birds’ eggs. J. Anat. Physiol. 20, 225–237 (1886).

30. Inomata, K. et al. Sterically locked synthetic bilin derivatives and phytochrome Agp1 from Agrobacterium tumefaciens form photoinsensitive Pr- and Pfr-like adducts. J. Biol. Chem. 280, 24491–24497 (2005).

31. BirdLife International & NatureServe Bird Species Distribution Maps of the World version 5.0 (BirdLife International & NatureServe, 2015).

32. Gaston, K. J., Chown, S. L. & Evans, K. L. Ecogeographical rules: elements of a synthesis. J. Biogeogr. 35, 483–500 (2008).

33. Losos, J. B. Uncertainty in the reconstruction of ancestral character states and limitations on the use of phylogenetic comparative methods. Anim. Behav. 58, 1319–1324 (1999).

34. Beckmann, M. et al. glUV: a global UV-B radiation data set for macroecological studies. Methods Ecol. Evol. 5, 372–383 (2014).

35. Maurer, G. et al. First light for avian embryos: eggshell thickness and pigmentation mediate variation in development and UV exposure in wild bird eggs. Funct. Ecol. 29, 209–218 (2015).

36. Maurer, G., Portugal, S. J. & Cassey, P. Review: an embryo’s eye view of avian eggshell pigmentation. J. Avian Biol. 42, 494–504 (2011).

37. Moreno, J. & Osorno, J. L. Avian egg colour and sexual selection: does eggshell pigmentation reflect female condition and genetic quality? Ecol. Lett. 6, 803–806 (2003).

38. Gosler, A. G., Connor, O. R. & Bonser, R. H. C. Protoporphyrin and eggshell strength: preliminary findings from a passerine bird. Avian Biol. Res. 4, 214–223 (2011).

39. Yang, C. et al. Keeping eggs warm: thermal and developmental advantages for parasitic cuckoos of laying unusually thick-shelled eggs. Naturwissenschaften 105, 10 (2018).

40. Davies, N. B. & de Brooke, M. L. An experimental study of co-evolution between the cuckoo, Cuculus canorus, and its hosts. I. Host egg discrimination. J. Anim. Ecol. 58, 207–224 (1989).

41. Yang, C., Liang, W., Møller, A. P. in Avian Brood Parasitism: Behaviour, Ecology, Evolution and Coevolution (ed. Soler, M.) 345–361 (Springer, 2017).

42. Yang, C. et al. Coevolution in action: disruptive selection on egg colour in an avian brood parasite and its host. PLoS ONE 5, e10816 (2010).

43. Węgrzyn, E., Leniowski, K., Rykowska, I. & Wasiak, W. Is UV and blue-green egg colouration a signal in cavity-nesting birds? Ethol. Ecol. Evol. 23, 121–139 (2011).

44. Wesołowski, T. & Maziarz, M. Dark tree cavities: a challenge for hole nesting birds? J. Avian Biol. 43, 454–460 (2012).

45. Endler, J. A. The color of light in forests and its implications. Ecol. Monogr. 63, 1–27 (1993).

46. Martin, T. E. et al. Enclosed nests may provide greater thermal than nest predation benefits compared with open nests across latitudes. Funct. Ecol. 31, 1231–1240 (2017).

47. Godard, R. D., Wilson, C. M., Frick, J. W., Siegel, P. B. & Bowers, B. B. The effects of exposure and microbes on hatchability of eggs in open-cup and cavity nests. J. Avian Biol. 38, 709–716 (2007).

48. von Haartman, L. Adaptation in hole-nesting birds. Evolution 11, 339–347 (1957).

49. Holyoak, D. The function of the pale egg colour of the jackdaw. Bull. Br. Ornithol. Club 89, 159 (1969).

50. Abercrombie, R. G. The colour of birds’ eggs. Naturalist 56, 105–108 (1931).

51. Needham, A. E. The Significance of Zoochromes Vol. 3 (Springer, 1974).

52. Caro, T. The adaptive significance of coloration in mammals. BioScience 55, 125–136 (2005).

53. Bakken, G. S., Vanderbilt, V. C., Buttermer, W. A. & Dawson, W. R. Avian eggs: thermoregulatory value of very high near-infrared reflectance. Science 200, 321–323 (1978).

54. D’Alba, L. et al. What does the eggshell cuticle do? A functional comparison of avian eggshell cuticles. Physiol. Biochem. Zool. 90, 588–599 (2017).

55. Cassey, P. et al. Variability in avian eggshell colour: a comparative study of museum eggshells. PLoS ONE 5, e12054 (2010).

56. Matysioková, B. & Remeš, V. Evolution of parental activity at the nest is shaped by the risk of nest predation and ambient temperature across bird species. Evolution 72, 2214–2224 (2018).

57. L’Herpiniere, K. L., O’Neill, L. G., Russell, A. F., Duursma, D. E. & Griffith, S. C. Unscrambling variation in avian eggshell colour and patterning in a continent-wide study. R. Soc. Open Sci. 6, 181269 (2019).

58. Gómez, J. et al. Latitudinal variation in biophysical characteristics of avian eggshells to cope with differential effects of solar radiation. Ecol. Evol. 8, 8019–8029 (2018).

59. Martin, T. E., Martin, P. R., Olson, C. R., Heidinger, B. J. & Fontaine, J. J. Parental care and clutch sizes in North and South American birds. Science 287, 1482–1485 (2000).

60. Martin, T. E., Scott, J. & Menge, C. Nest predation increases with parental activity: separating nest site and parental activity effects. Proc. Biol. Sci. 267, 2287–2293 (2000).

61. Conway, C. J. & Martin, T. E. Evolution of passerine incubation behavior: influence of food, temperature, and nest predation. Evolution 54, 670–685 (2000).

62. Piersma, T. et al. High daily energy expenditure of incubating shorebirds on High Arctic tundra: a circumpolar study. Funct. Ecol. 17, 356–362 (2003).

63. D’Alba, L., Monaghan, P. & Nager, R. G. Thermal benefits of nest shelter for incubating female eiders. J. Therm. Biol. 34, 93–99 (2009).

64. Mallory, M. L., Gaston, A. J. & Gilchrist, H. G. Sources of breeding season mortality in Canadian arctic seabirds. Arctic 62, 333–341 (2009).

65. Martin, T. E. A new view of avian life-history evolution tested on an incubation paradox. Proc. Biol. Sci. 269, 309–316 (2002).

66. Ghalambor, C. K., Peluc, S. I. & Martin, T. E. Plasticity of parental care under the risk of predation: how much should parents reduce care? Biol. Lett. 9, 20130154 (2013).

67. Martin, T. E. Age-related mortality explains life history strategies of tropical and temperate songbirds. Science 349, 966–970 (2015).

68. Gill, S. A. & Haggerty, T. M. A comparison of life-history and parental care in temperate and tropical wrens. J. Avian Biol. 43, 461–471 (2012).

69. Martin, T. E. & Ghalambor, C. K. Males feeding females during incubation. I. Required by microclimate or constrained by nest predation? Am. Nat. 153, 131–139 (1999).

70. Roper, J. J. & Goldstein, R. R. A test of the Skutch hypothesis: does activity at nests increase nest predation risk? J. Avian Biol. 28, 111–116 (1997).

71. Skutch, A. F. Parent Birds and Their Young (Corrie Herring Hooks Series 2, Univ. Texas Press, 1976).

72. Blanco, G. & Bertellotti, M. Differential predation by mammals and birds: implications for egg-colour polymorphism in a nomadic breeding seabird. Biol. J. Linn. Soc. Lond. 75, 137–146 (2002).

73. Weidinger, K. Does egg colour affect predation rate on open passerine nests? Behav. Ecol. Sociobiol. 49, 456–464 (2001).

74. Watt, W. B. Adaptive significance of pigment polymorphisms in Colias butterflies. I. Variation of melanin pigment in relation to thermoregulation. Evolution 22, 437–458 (1968).

75. Vleck, C. M., Vleck, D. & Hoyt, D. F. Patterns of metabolism and growth in avian embryos. Am. Zool. 20, 405–416 (1980).

76. Hanley, D. & Grim, T. & Cassey, P. & Hauber, M. E. Not so colourful after all: eggshell pigments constrain avian eggshell colour space. Biol. Lett. 11, 20150087 (2015).

77. Hanley, D., Cassey, P. & Doucet, S. M. Parents, predators, parasites, and the evolution of eggshell colour in open nesting birds. Evol. Ecol. 27, 593–617 (2013).

78. Digital Chart of the World (Defense Mapping Agency, accessed 26 September 2019); https://worldmap.harvard.edu/data/geonode:Digital_Chart_of_the_World

79. Kelso, N. V. & Patterson, T. Introducing Natural Earth data: naturalearthdata.com. Geogr. Tech. 5, 82–89 (2010).

80. Fick, S. E. & Hijmans, R. J. WorldClim 2: new 1-km spatial resolution climate surfaces for global land areas. Int. J. Climatol. 37, 4302–4315 (2017).

81. Lee-Taylor, J. & Madronich, S. Climatology of UV-A, UV-B, and Erythemal Radiation at the Earth’s Surface, 1979–2000 NCAR Technical Note TN-474-STR (NCAR, 2007).

82. Mitchell, T. D., Carter, T. R., Jones, P. D., Hulme, M. & New, M. A Comprehensive Set of High-Resolution Grids of Monthly Climate for Europe and the Globe: the Observed Record (1901–2000) and 16 Scenarios (2001–2100) Working Paper 55 (Tyndall Centre for Climate Change Research, 2004).

83. Hackett, S. J. et al. A phylogenomic study of birds reveals their evolutionary history. Science 320, 1763–1768 (2008).

84. Jetz, W., Thomas, G. H., Joy, J. B., Hartmann, K. & Mooers, A. O. The global diversity of birds in space and time. Nature 491, 444–448 (2012).

85. Sukumaran, J. & Holder, M. T. DendroPy: a Python library for phylogenetic computing. Bioinformatics 26, 1569–1571 (2010).

86. Pagel, M. Detecting correlated evolution on phylogenies: a general method for comparative analysis of discrete characters. Proc. R. Soc. Lond. B 255, 37–45 (1994).

87. Anselin, L. & Bera, A. K. Spatial dependence in linear regression models with an introduction to spatial econometrics. Stat. Textb. Monogr. 155, 237–290 (1998).

88. Anselin, L. Spatial Econometrics: Methods and Models (Kluwer Academic Publishers, 1988).

89. Elhorst, J., J. P. Spatial Econometrics: from Cross-Sectional Data to Spatial Panels (Springer, 2014).

90. Millo, G. & Piras, G. splm: spatial panel data models in R. J. Stat. Softw. 47, 1–38 (2012).

91. Pagel, M. Inferring evolutionary processes from phylogenies. Zool. Scr. 26, 331–348 (1997).

92. Freckleton, R. P., Harvey, P. H. & Pagel, M. Phylogenetic analysis and comparative data: a test and review of evidence. Am. Nat. 160, 712–726 (2002).

93. Burnham, K. P. & Anderson, D. R. Model Selection and Multimodel Inference: A Practical Information-Theoretic Approach 2nd edn (Springer, 2002).

94. Schindelin, J. et al. Fiji: an open-source platform for biological-image analysis. Nat. Methods 9, 676–682 (2012).