Potato leaves and stems are poisonous. The greenish tinge you are seeing is what potato farmers refer to as greening or "sunburn' -- the sun activates the poisonous compound in the plant that are normally not present in the tubers because they are not exposed to sunlight while growing. Tubers with sunburn grew too close to the soil's surface and were exposed to sunlight. Cooking does NOT deactivate those poisonous compounds, and boiling green potatoes causes the solanine to leach into the water they are boiled in, so that the rest of the potatoes in the pot may absorb it along with the water.
As long as you fully cut away the green parts *before cooking*, the rest of the potato is safe to eat, unless for some reason you make a habit of buying sunburned potatoes and constantly get small exposures to solanine. If you select potatoes individually, just don't buy any that are sunburned. If they turn up in a bag, pare them carefully to get rid of as much greened area as possible, but you can eat the rest. If you have green buds on a potato that is otherwise not sunburned, use the tip of your peeler to gouge out down about 1/2" below the sprout before cooking the potato. (That's what that little curved spoonlike tip on the peeler is for.)