All parts of the potato plant contain glycoalkaloids, solanine, and chaconine. These alkaloids get found in higher concentrations in the leaves, stems, flowers, and immature sprouts. These alkaloids are natural pesticides that protect the potato plant from insects, bacteria, fungi, and other predators. Solanine has a bitter taste, so people generally avoid eating green potatoes or potatoes that have sprouted. However, even if a potato has no visible green discoloration, it may still contain high levels of solanine.