Depending on the species, bird eggs can be any color ranging from chicken’s plain white to a robin’s blue, streaked, spotted, bright, pale, and anything in between.
As the egg moves down the female’s oviduct, the tube that connects the ovary to the outside, it squeezes against glands that produce colored pigments that combine to form every color in the egg shell spectrum. If the egg is stationary at the time that it comes in contact with these glands, it’ll be spotted. If the egg is in motion, it will be streaked.
With Flying Colors
So why go through all the trouble of producing colored eggs? For many species of birds that nest out in the open, the eggs’ colors help to conceal them by enabling them to blend into the background. Another way that colored eggs come in handy, is that in some species, like murres, individual birds learn to recognize their own particular markings and reject eggs that don’t match. In contrast, birds that nest in cavities, or that start incubating as soon as the egg is laid and consequently don’t need to hide their eggs, tend to lay unmarked white ones.
Given all this, how do scientists explain the fact that robin’s eggs are an eye-catching, unmarked blue? Perhaps this enables robins to spot when a parasitic bird tries to add its own eggs to the nest. For some species, this may pose a greater threat than that of nest robbers.
“Color of Eggs” (Stanford)