Coloured eggs are not a unique characteristic to birds, but instead evolved from dinosaurs, scientists have discovered.
The research, published in the journal Nature, found birds inherited their shell colour from dinosaur ancestors that laid eggs in open nests.
Camouflaging colours emerged to help protect vulnerable offspring from predators, scientists at Yale, the American Museum of Natural History, and the University of Bonn said.
The researchers said they have dispelled a two centuries-old belief that bird shell colours appeared independently.
Red and blue are the only two pigments used by modern birds to create all the various egg colours and patterns.
The team analysed 18 fossil dinosaur eggshell samples from around the world, testing for the presence of the two pigments.
Results showed the pigments in eggshells belonging to Eumaniraptoran dinosaurs, which include small, carnivorous dinosaurs such as Velociraptor.
Lead author Jasmina Wiemann said: "This completely changes our understanding of how egg colours evolved.
"For two centuries, ornithologists assumed that egg colour appeared in modern birds' eggs multiple times, independently."
She added: "We infer that egg colour co-evolved with open nesting habits in dinosaurs.
"Once dinosaurs started to build open nests, exposure of the eggs to visually hunting predators and even nesting parasites favoured the evolution of camouflaging egg colours, and individually recognisable patterns of spots and speckles."
Australian Associated Press