Asked by: Christine Ellis, Leeds
Egg white is 92 per cent water, with a mixture of around 148 different proteins, mainly ovalbumin, ovotransferrin and ovomucoid. At room temperature, these proteins are held in a complex 3D globular structure by sulphur bonds between the amino acids in the protein chain.
When the egg cooks, the heat causes the sulphur bonds to come undone so each protein molecule unravels and gets tangled up with its neighbours in a solid mass. This process happens at 77°C for ovalbumin.
But above 70°C, the sulphur also forms hydrogen sulphide that reacts with iron in the egg yolk to form iron sulphide, and this gives it a greenish grey colour.
You can prevent this by running the eggs under the cold tap to lower their temperature as soon as they are cooked.
Subscribe to BBC Focus magazine for fascinating new Q&As every month and follow @sciencefocusQA on Twitter for your daily dose of fun science facts.