The pigments are produced in the chickens's body. And because each egg is colored separately, there is a lot of variation even in eggs laid by the same chicken. Each chicken can lay eggs that haven't been fertilized. But these unfertilized eggs will never develop an amnion, allantois, chorion, or embryo. Most of the chicken eggs you buy in the grocery store are unfertilized eggs.
Lets look at the hen.
Before it can produce a baby chick, and egg must be fertile. A hen can lay eggs all her life without laying a fertile one, in order to produce a fertile egg, a hen must have a husband. Most the eggs you buy in the store are unfertile, and would never be a chick. Let's look at the developing chick and it's parts. The egg cell in the fertile egg is the part that becomes the baby.