Do they all contain a toxic alkaloid?
No. Many alternative medicine websites allege that nightshade vegetables contain a toxic alkaloid compound called solanine, a defence mechanism in some Solanaceae plants that protects against natural threats such as insects. It’s true that solanine may develop in potatoes, which turn green when they are exposed to light during growth, says Micallef. (That’s why potatoes with green areas should be discarded.) Contrary to the rumours, however, eggplant, peppers and tomatoes—even the green ones—do not produce solanine and are perfectly safe to eat, he says.