Egg yolk contains iron. When heat is applied to the yolk long enough, iron from the yolk reacts with the hydrogen sulfide (present in the white of the egg) to form iron sulfide, which is what imparts the greenish tinge to the overcooked egg.
If you’ve ever accidentally overcooked a hard-boiled egg, you’ve surely noticed that the area where the yolk meets the egg white often becomes greenish. Have you ever wondered why?
What happens when an egg is boiled?
Proteins are one of the primary components of an egg. The white of an egg is 12% protein, while the yolk is composed of 16% protein. The proteins found in egg whites are actually long molecules, composed of chains of amino acids that are linked together.
When the egg is raw, these proteins are all tangled up with each other, but when the egg is boiled, i.e., when heat is applied to the egg, these proteins unfold and form new bonds among themselves.
Such a change in the original (or native) structure of proteins (or nucleic acids) in the presence of heat (or other external agents, such as a strong acid or base, or an organic solvent, like chloroform or alcohol) is called the denaturation of proteins.
The longer you continue to heat the egg, the closer the proteins get to one another and coagulate, forming additional bonds within their clusters. That’s why an egg becomes hard when boiled, hence the name ‘hard-boiled’ egg.
Overcooking a hard-boiled egg
As mentioned earlier, egg whites contain proteins. Those proteins, in turn, contain a small amount of sulfur. During denaturation (i.e., when you boil the egg), the sulfur in the proteins of the egg white combines with hydrogen to form hydrogen sulfide. Now, one thing that you should know about hydrogen sulfide is that it stinks! Big time!
Ask anyone with a degree in chemistry about the first thing that comes to their mind when you say ‘hydrogen sulfide’, and in all likelihood, their initial response will include the mention of its unbelievably foul smell.
Since it’s heavier than both nitrogen and oxygen – the two primary gases found in our atmosphere – hydrogen sulfide is found in low wells, caves and mines. Apart from being horribly stinky, it’s also quite poisonous and highly flammable – to the point of being violently explosive.
You might have guessed by now that the characteristic “rotten egg” smell is actually hydrogen sulfide gas. Fortunately for all you egg lovers out there, the volume of hydrogen sulfide released from an overcooked egg is so minuscule that it doesn’t pose a threat to anyone in the vicinity.
The green color of an overcooked hard boiled egg
Every egg yolk contains iron, which is released when the egg is heated long enough. When these iron cations interact with hydrogen sulfide (around the region where the egg white meets the yolk), a chemical reaction takes place between the two chemicals, which produces iron sulfide.
It’s the iron sulfide formed as a result of the aforementioned chemical reaction that imparts that distinctive greenish hue around the yolk of the egg. The more heat you apply, the more coloration you will see in the egg.
The same thing happens when you cook eggs in a container made of iron (such as an iron skillet). The iron present in the container reacts with the hydrogen sulfide from the egg white and gives the overcooked egg a grayish-green color.