Short answer
Shell colour is primarily genetic. Pigments deposited during shell formation create white, brown, blue or green appearances, but colour does not reliably predict nutrition, freshness, flavour or welfare.
How the colours are made
A white shell has little visible pigment. Brown pigment is deposited mainly on the outer surface late in formation. Blue-green pigment is incorporated through the shell, while green or olive shades commonly combine a blue base with brown surface pigment.
Breed matters more than feather colour
Some breeds reliably lay particular shell colours, although individual shade varies. Earlobe or feather colour can correlate within certain breed groups but is not a universal rule. Genetics, age and the laying cycle affect intensity.
What colour cannot tell you
A brown egg is not inherently more nutritious than a white egg, and a blue egg is not automatically rare or superior. Farming system, feed, freshness, size and quality controls are separate questions that require their own evidence or labels.