First, I let the eggs "age" a few weeks so that they won't cling to the shells so much (new eggs are harder to peel). Secondly, I put them in cold water to about 1-inch above the top and set them to boil (I also add baking soda because the baking soda will make the eggs much easier to peel; I add salt to the water, as well, but am not sure if the salt actually does anything flavor-wise). Once the water starts a hard boil, I take the eggs off the heat, cover them and let them sit. The size of the egg determines how long they sit in the hot water (I usually make hard-boiled eggs; otherwise, how cooked I want them would also determine how long they sit in the hot water). If the eggs are large, they sit in the hot water for 10 minutes. If they are extra-large, they sit for 12 minutes. As soon as the time is over, they immediately go into cool or cold water to cease cooking. This past Easter, for the first time, I put them immediately into an ice bath, rather than what I've typically done, which is cold tap water then change the water a few minutes later when the water warms up. While the yolks had a creamier texture from doing the ice bath method (because cooking ceased immediately), I think I might try letting the eggs sit another minute in the hot water then put them in the ice bath because I like the yolks to be a little more done for that particular purpose (I was making deviled eggs).
Cooking the eggs in this fashion for this length of time has never resulted in green-tinged (overcooked) or undercooked yolks.