The eggshells of modern birds exhibit a spectacular array of rainbow hues—from butter yellow to blood red, palest aqua to darkest cyan. Some are spotted or speckled; others are blemish-free. How and when did the astonishing diversity of egg colors and patterns evolve? Among modern-day amniotes (the group that includes birds, reptiles and mammals), only birds produce colored eggs. The other egg layers make plain white ones. So the prevailing wisdom has been egg color is strictly a bird innovation—but new findings indicate that long before robin’s egg blue, there was Deinonychus’s egg blue.

In a paper published in this week in Nature researchers report on pigments found in fossilized eggshells from several dinosaur species. The work indicates the dazzling variety of colors and patterns in modern bird eggs traces back to a single evolutionary origin in nonavian dinosaurs. (Technically, birds are a subgroup of dinosaurs; hence the distinction between avian and nonavian.) The discovery adds to a growing body of evidence from fossil pigments that is revolutionizing dinosaur science.

The first hints egg color might have originated in nonavian dinosaurs came last year, when Jasmina Wiemann, a PhD student at Yale University, and her colleagues announced their discovery of the pigment responsible for blue-green egg color in fossilized eggshells of several oviraptorid dinosaurs from China. Oviraptorids were relatively small, bipedal dinosaurs with grasping hands, toothless beaks and feathers. The finding established that at least one group of nonavian dinosaurs had colored eggs, raising the question of whether birds inherited egg color from their nonavian dinosaur ancestors or the coloration evolved independently in birds and nonavian dinosaurs.

In the new study Wiemann and her colleagues sampled the eggshells of 19 species of birds, crocodilians and nonavian dinosaurs and analyzed their chemical composition using a technique called Raman spectroscopy, which can identify pigments. The colors of modern bird eggs derive from just two pigments: biliverdin and protoporphyrin IX. The researchers detected both pigments in their fossil eggshell samples. Mapping the results onto a family tree, the team determined egg color arose just once—within the Eumaniraptora group of dinosaurs, which includes oviraptorids and some other nonavian dinosaurs as well as all modern birds. Sauropods (Apatosaurus and its ilk) and ornithischians (Triceratops and kin) do not appear to have laid pigmented eggs. And the few eumaniraptoran lineages that lost egg color did not regain it—presumably because the gene cascades that give rise to egg color are so complex, Wiemann notes.

The study results offer insights into the long-standing question of why egg color evolved in the first place. Scientists have previously proposed a number of hypotheses to explain the phenomenon, arguing pigments may have either helped camouflage eggs in certain environments, provided protection against damaging solar radiation or fortified the shell, among other benefits. The fossil eggshell pigments Wiemann and her colleagues detected come from dinosaurs known to have deposited their eggs in aboveground nests rather than burying them like their predecessors did. This association suggests a shift in nesting behavior was a key driver of the emergence of egg color, although other factors may have also contributed. For example, in the case of the Chinese oviraptorids—which are thought to have nested near rivers—blue-green egg color may well have helped them blend in with the nest materials and surrounding vegetation, concealing them from predators.

Outside experts find the team’s claims for pigment preservation in the fossil eggs convincing. “This is good stuff,” says Jakob Vinther of the University of Bristol in England, an authority on ancient pigments. He notes the team demonstrated Raman spectroscopy can reliably distinguish pigments from proteins, which can look quite similar.

The findings could have intriguing implications for understanding parental care in dinosaurs. In the 1990s paleontologists working in Mongolia recovered an exquisitely preserved fossil of an oviraptorid positioned atop a nest of eggs. Hailed as powerful evidence the brooding behavior of modern birds originated in nonavian dinosaurs, the fossil, presumed to be female, was nicknamed “Big Mama.” But years later researchers examined a number of fossils of adult dinosaurs preserved with egg clutches (including oviraptorids), comparing the fossil specimens’ egg volume and bone structure details with those of modern birds. Their conclusion: the brooding dinosaurs were probably male. The new egg color evidence “adds the missing piece of the puzzle,” Wiemann says. In modern birds such as robins blue egg color is often associated with higher levels of paternal care. The thinking is that the eggs’ color is a signal of quality in the mom and hence her young, and as such it prompts the dad to go the extra mile in providing for his family. The revelation oviraptorids and some other eumaniraptorans had blue eggs thus supports the claim paternal care in birds originated in nonavian dinosaurs. That is, Big Mama might be more appropriately named Big Papa.

“The discovery of a single origin of eggshell color in dinosaurs is a wonderful reminder that modern birds inherited many traits from their dinosaurian ancestors,” says Mary Stoddard of Princeton University, who studies the evolution of bird eggs and was not involved in the new work. She notes that in recent years the realization many nonavian dinosaurs possessed colorful feathers has transformed scientists’ thinking about dinosaur biology and behavior. This new study, she adds, “is likely to inspire a whole new area of research on dinosaur nesting and incubation behavior.”