Fruits and vegetables get their color from natural pigments, molecules that absorb certain wavelengths of light and reflect others back to your eyes. Four main pigment families do most of the work: chlorophylls create greens, carotenoids produce yellows, oranges, and reds, anthocyanins generate reds, purples, and blues, and anthoxanthins are responsible for whites and creamy yellows. Each pigment plays a different biological role in the plant, and each responds differently to cooking, ripening, and even soil conditions.
Why Most Vegetables Are Green
Green is the default color of most plant tissue, and it comes from chlorophyll, the pigment that drives photosynthesis. Terrestrial plants produce two types: chlorophyll a and chlorophyll b. Both absorb light heavily in the red and blue portions of the spectrum while reflecting green wavelengths back, which is why leaves, stems, and unripe fruits look green. Only a few percent of the light in the green region (500 to 600 nanometers) gets absorbed, even though that green light can power photosynthesis just as efficiently as red light.
Chlorophyll is fat-soluble, meaning it doesn’t dissolve in water. That’s why boiling broccoli doesn’t leach the green color into the cooking water the way it can with other pigments. Heat does break chlorophyll down, though. Extended cooking causes it to lose its magnesium atom, shifting the color from bright green to an olive or brownish hue. That’s why overcooked green beans look dull compared to ones that have been blanched quickly.
Carotenoids: Yellows, Oranges, and Reds
Carotenoids are the pigments behind carrots, mangoes, apricots, and the orange flesh of sweet potatoes. They’re also fat-soluble, which means your body absorbs them better when you eat them with a little oil or fat. The two most important carotenoids in your diet are beta-carotene and lycopene.
Beta-carotene is the most widespread carotenoid in nature. It’s abundant in orange and yellow vegetables like carrots and certain peppers, but it also shows up in dark green leafy vegetables like kale, spinach, and lettuce, where its color is simply masked by the much larger amount of chlorophyll present. Your body converts beta-carotene into vitamin A, making it the most significant dietary source of that nutrient.
Lycopene is responsible for the red color of tomatoes, watermelon, pink guava, and papaya. Unlike beta-carotene, lycopene doesn’t convert to vitamin A, but it’s a powerful antioxidant on its own. Interestingly, cooking actually makes lycopene more available to your body. The heat breaks down cell walls in the fruit, releasing more of the pigment than you’d get from eating the same food raw.
Because carotenoids are fat-soluble, they hold up well during cooking. Boiling carrots won’t wash out their orange color. Light, oxygen, and very high temperatures can gradually degrade them over time, but for typical home cooking, carotenoids are among the most stable pigments.
Anthocyanins: Reds, Purples, and Blues
Anthocyanins are the pigment family responsible for the widest range of visible colors in fruits and vegetables. Blueberries, red cabbage, eggplant skin, cherries, and red grapes all owe their hues to anthocyanins. What makes these pigments unusual is that their color shifts dramatically depending on acidity.
In acidic conditions (below pH 3), anthocyanins appear red. At a neutral pH around 7, they turn purple. In alkaline conditions above pH 8, they shift to blue. This is why red cabbage juice is a classic chemistry demonstration: add vinegar and it turns red, add baking soda and it turns blue-green. The same chemistry plays out inside the plant. The exact shade of a blueberry, a plum, or a grape depends partly on the pH inside its cells.
This pH sensitivity also means growing conditions can influence color. Research on crabapple leaves found that plants grown in more acidic conditions produced redder foliage, while those in higher-pH environments shifted toward green and yellow tones. The acidity didn’t just change existing pigment color; it also affected how much anthocyanin the plant produced in the first place, with lower pH boosting accumulation.
Unlike carotenoids, anthocyanins are water-soluble. That’s why boiling red cabbage turns the cooking water purple and why beet juice stains everything it touches. Heat, light, and oxygen all break anthocyanins down over time, which is one reason deeply colored berries lose vibrancy when cooked for long periods.
Betalains: The Beet Exception
Beets, prickly pear, Swiss chard stems, and dragon fruit get their intense reds and yellows from betalains, a completely separate pigment family that exists only in plants belonging to the Caryophyllales order. Betalains and anthocyanins never appear in the same plant. This mutual exclusion puzzled scientists for years, and current research points to a biochemical fork in the road: Caryophyllales plants overproduce the amino acid tyrosine (the building block for betalains) while depleting phenylalanine (the building block for anthocyanins). The imbalance between these two pathways essentially locks these plants into one pigment system.
Like anthocyanins, betalains are water-soluble and sensitive to heat, light, and oxygen. This is why beet juice fades when you cook it too long, and why the vivid magenta of a fresh beet can turn brownish after extended roasting.
What Makes White Produce White
White and cream-colored fruits and vegetables contain anthoxanthins, water-soluble pigments that range from white to pale yellow. Bananas, cauliflower, garlic, onions, potatoes, parsnips, ginger, and turnips all fall into this category. The color might seem unremarkable, but white produce carries its own nutritional profile. White vegetables typically provide 1 to 5.6 grams of fiber per serving and are rich in potassium and magnesium, two minerals most people don’t get enough of.
Garlic stands out in this group for containing allicin, a compound with antioxidant and antimicrobial properties. Allicin has been studied for its ability to help lower blood pressure and cholesterol, and for potential protective effects on nerve cells.
How Ripening Changes Color
The most visible example of pigment chemistry in action is fruit ripening. A green tomato turning red, a banana shifting from green to yellow to brown: these transitions happen because chlorophyll is actively broken down while other pigments are either revealed or newly produced.
When a fruit ripens, enzymes dismantle chlorophyll molecules through a process called the pheophorbide a oxygenase pathway. The green pigment gets converted into colorless breakdown products, similar in structure to bile pigments. As the green fades, carotenoids and anthocyanins that were already present in smaller amounts become visible. In many fruits, ripening also triggers new production of these pigments. A tomato doesn’t just lose its green; it actively ramps up lycopene synthesis, deepening from pale orange to red.
This is why you can sometimes speed up ripening by placing fruit in a paper bag. The fruit releases ethylene gas, a natural ripening hormone, and trapping it in a confined space increases the concentration around the fruit, accelerating chlorophyll breakdown and pigment development.
Why Cooking Affects Some Colors More Than Others
Whether a pigment survives cooking depends largely on whether it’s fat-soluble or water-soluble. Fat-soluble pigments like chlorophyll and carotenoids stay in the plant tissue during boiling because they don’t dissolve into the cooking water. Water-soluble pigments like anthocyanins, betalains, and anthoxanthins will leach out, which is why boiling red cabbage or beets colors the water. Steaming, roasting, or sautéing minimizes this loss because there’s less water to dissolve the pigments into.
Temperature matters too. Elevated heat accelerates the breakdown of all natural pigments by disrupting their molecular structure. Chlorophyll turns olive-brown, carotenoids fade, and anthocyanins lose intensity. Short, high-heat cooking methods like stir-frying tend to preserve color better than long, slow simmering. This isn’t just cosmetic: because many of these pigments double as antioxidants and nutrients, preserving color often means preserving nutritional value as well.

