By Dr. Rowland, Paleontologist & Las Vegas Natural History Museum Lab Manager
Some bird eggs are very colorful, such as the blue robin egg in the first photo (from the LVNHM bird egg collection). But no other egg-laying animals, such as turtles and crocodiles, lay colorful eggs. For this reason, paleontologists guessed that pigmented eggshells first evolved in birds, only a few tens of millions of years ago.
To test this hypothesis, researchers used a technique called Raman spectroscopy, which allowed them to detect the presence of pigments in fossil eggshells. They discovered evidence of pigment in only one group of dinosaurs―the maniraptors. This is a group of theropod dinosaurs (the group to which T. rex belongs ) from which birds evolved. Eggs of other dinosaur groups, such as sauropods and troodontids, showed no pigment signal.
The researchers concluded that pigmented eggs evolved only once―in theropod dinosaurs―probably in the Jurassic Period, more than 150 million years ago. So, T. rex and its relatives very possibly laid colorful eggs, but other groups, such as the ankylosaur in the second image (on display in LVNHM) did not.