The same compound responsible for the distinctive "cooked egg smell" causes dark gray-green rings to form in the egg white and discolor the yolks. Egg whites contain sulfur and iron, and when cooked in water over 158 degrees Fahrenheit for too long, the compounds react and form rings of iron sulfide. Cooking hard-boiled eggs with residual heat from boiling water as it cools, and stopping the cooking as soon as possible afterward, prevents this discoloration.
Cooking the Eggs
Cooking eggs from room temperature is the first step in preventing dark circles. Place room-temperature eggs in a saucepan in an even layer and add enough cool water to cover by 1 inch. Bring the water to a full boil and cover with a lid, then take the pan off the stove. Let large eggs stand for 15 minutes, and let medium eggs stand for 12 minutes, then remove the lid.
Cooling the Eggs
Fill a container full of ice while the eggs cook and top it off with water. Transfer the eggs to the ice bath using a slotted spoon when they finish cooking. Cool the eggs for about 5 minutes if you want them hot when you peel them, and let them cool for the same amount of time you cooked them, 12 or 15 minutes, if you want them at room temperature when you peel them.