Robins may be famous for their beautiful blue eggs, but ancient feathered dinosaurs beat them to the punch.

Looking at fossil eggshells from China, researchers have found evidence that an omnivorous, ostrich-like dinosaur laid clutches of blue-green eggs, potentially helping to camouflage them in open nests dug into the ground.

The discovery overturns a common assumption: “Everyone thought dinosaur eggs were white,” says study coauthor Jasmina Wiemann at Yale University.

Many birds lay white, unpigmented eggs—as do all lizards, turtles, crocodiles, and the only known egg-laying mammals, the platypus and the echidna. For this reason, ornithologists had long assumed that colored eggshells evolved solely in some groups of birds after nonavian dinosaurs had died out. (Also find out the surprising link between eggs shape and flight in birds.)

“Once the idea that colored eggs evolved in birds and were a trait of modern birds had been suggested, no one thought about it again or dared to ask if dinosaur eggs had been colored,” Wiemann says.

Related: Dinosaurs May Have Danced Like Birds Fossil research has shown that birds and dinosaurs shared behaviors such as brooding and nest building. According to paleontologist and National Geographic grantee Jack Horner, it also stands to reason that dinosaurs had similar courting behaviors as today’s birds.

Now, a study by Wiemann and her colleagues in Germany and California pushes back the origins of colored eggs at least as far as the Late Cretaceous.

As they report in the journal PeerJ, a species of oviraptor called Heyuannia huangi had eggs that were colored deep blue-green. Commonly found in the fossil beds of eastern China, Heyuannia was a parrot-beaked, feathered species that walked on its hind legs and would have been about five feet long.

While many fossil dinosaur eggs are black or brown due to the fossilization process, the eggs of Heyuannia have an unusual blueish tint to them. This made the scientists wonder if the eggs could harbor any of their original color.

Using chemical analyses, they were able to detect traces of two pigments, biliverdin and protoporphyrin, commonly found in modern bird eggs. Millions of years ago, the eggs would likely have been a greener color, Wiemann says, perhaps similar to eggs laid by Australia’s ground-nesting emus and cassowaries today, which blend in well with the surrounding vegetation.

“I was originally taught that all the weird colors you can get in fossils, like the blueish-green hue, may be due to mineral precipitation,” Wiemann says.

“We screened through lots of eggshells, and one day had a positive result for these oviraptor eggs. It was a huge surprise. I couldn’t believe it.”

View Images Chemical analyses of the fossil eggs detected traces of the pigments biliverdin and protoporphyrin, commonly found in modern bird eggs. Photograph by Tzu-Ruei Yang, The Paleowonders Museum of Fossils and Minerals, Taiwan.

Molecular Revolution

The discovery highlights how much our thinking has changed about dinosaur preservation and how much more we can learn about the original animal, says David Varricchio, an expert on dinosaur reproduction at Montana State University who was not involved in the research.

The discovery of pigment traces “exemplifies the growing field and potential of molecular paleontology,” Varricchio says. “With new machines and new techniques, it’s very exciting what can potentially be found in fossils.” (Also find out about molecular work done on one of the best fossils ever found, the armored dinosaur Borealopelta markmitchelli.)

Some paleontologists have argued that theropod dinosaurs, which included the ancestors of modern birds, had open nests with partially exposed clutches, Varricchio says. This new discovery helps confirm that idea, as pigmented shells today are only found in bird species that have exposed eggs.

Colored eggs in birds is just one example in a whole series of traits formerly thought to be unique to birds—such as feathers and wishbones—that were in fact inherited from the dinosaurs, says Mark Norell, a palaeontologist at the American Museum of Natural History in New York City.

“Dinosaurs evolved colored eggs before birds evolved—and the reason birds have colored eggs is because they were present in their ancestors, the nonavian dinosaurs,” he says. (Read about the “baby dragon” dinosaur found inside a giant egg.)

Wiemann is now looking for other examples of egg color among the carnivorous species closely related to birds that had open nests. She is also looking to see if any dinosaurs laid eggs with streaks or speckles on them.

“Lots of ground birds have patterned eggs with spots all over them,” says Norell. “It would be really neat if we could show that some of these dinosaur eggs were kind of camouflaged as well.”