Yes, acidic ingredients can indeed alter the color of cooked vegetables, often causing them to fade or change hue.
The color of many vegetables is due to pigments like chlorophyll (green), carotenoids (orange and yellow), and anthocyanins (red, purple, and blue). These pigments react differently to acids. Chlorophyll, for example, can turn olive green or brown in the presence of acid because the magnesium atom in the chlorophyll molecule is replaced by hydrogen ions. Anthocyanins are particularly sensitive to pH changes; they can shift from red in acidic conditions to purple or even blue in neutral or alkaline conditions. Carotenoids are generally more stable but can still be affected by prolonged exposure to acid and heat, leading to some color degradation. Therefore, adding acidic ingredients like lemon juice, vinegar, or tomatoes during cooking can significantly impact the final color of your vegetables. The extent of the color change depends on the type of vegetable, the concentration of the acid, and the cooking time.
To minimize color changes when cooking vegetables with acidic ingredients, add the acid towards the end of the cooking process. This reduces the amount of time the pigments are exposed to the acid's effects, helping to preserve their vibrant colors.