To a food manager's dismay, the scrambled eggs on hot lines in school or hospital dining rooms can easily turn green. I recommend that facilities add a tablespoon of frozen orange juice concentrate to each large batch of scrambled eggs. This is enough vitamin C to prevent the reaction from occurring. Sometimes you can get really weird colors. Flavonoid compounds in onions and potatoes can turn yellow, if they are not acidic.
Many foods contain a mix of compounds that change color.
If a food has anthocyanins, which turn blue when nonacidic, and flavonoids, which turn yellow, they can produce green. The color compounds that I have mentioned so far are harmless, but there are others that do indicate toxins. For example, the green color on a stored potato indicates the presence of solanine, a toxin, just beneath the surface. The red cabbage recipe below has a little lemon juice in the cooking water to keep the color. The short cooking times produces a dish that is mild and sweet so that you may not recognize it as cabbage.