Q: How do blue eggs become blue (instead of white or brown)?
A: Whereas the brown color of an egg is laid on the outside of the shell, the blue color actually goes all the way through the shell, even to the inside of the shell. Originally, it was thought that color pigments were synthesized in the blood by the breakdown of hemoglobin, but research shows it is more likely that they are actually synthesized in the shell gland pouch.
The blue color is produced by biliverdin; the brown color is produced by protoporphyrin, and they are incorporated into the shell in different ways based on their different compositions. Again, to make it simple, the brown color can be thought of as being laid on the outside, while the blue color goes throughout the shell.
Green eggs contain both blue and brown pigments, and tend to be exceptionally hard to candle--harder sometimes than even some very dark brown eggs like those of Marans or Welsummers.