Short answer
Red cabbage, blueberries, blackcurrants and red grapes are coloured by anthocyanins, water-soluble pigments whose structure changes with acidity. In strong acid they sit as a red flavylium cation; as acidity falls they shift towards purple and blue quinoidal forms and colourless forms; in alkaline conditions they turn blue-green and then degrade to yellow. What you see depends on pH, on metal ions and on other molecules stacked against the pigment.
An anthocyanin is a sugar attached to a flavylium core, a charged ring system that absorbs green light strongly and so looks red. When acidity drops, the core loses protons or picks up water, and each form has different absorption. Reviews of anthocyanin chemistry describe the red flavylium cation dominating at very low pH, blue quinoidal species appearing as pH rises, and colourless carbinol and chalcone forms appearing in the mildly acidic range. All these forms can coexist, so the colour at any pH is a mixture weighted by which form dominates.
Chop red cabbage, steep it in hot water and the purple liquid is a working pH indicator. Lemon juice or vinegar turns it pink-red; plain tap water leaves it purple; a pinch of bicarbonate turns it blue and then green; strong alkali such as washing soda pushes it towards yellow as the pigment breaks down. The same thing happens by accident in the kitchen. Braised red cabbage is traditionally cooked with apple and vinegar because in hard, slightly alkaline water it would turn an unappetising blue-grey. Blueberries in a muffin made with too much bicarbonate go greenish for the same reason.
The green seen at high pH is partly an optical mix: a blue anthocyanin form alongside yellow flavonoids and breakdown products.
pH is the largest effect but not the only one. Metal ions such as iron and aluminium can bind to anthocyanins with neighbouring hydroxyl groups and shift them bluer; the classic example is hydrangea flowers turning blue in aluminium-rich acid soil. Other flavonoids and phenolic acids can stack flat against the pigment (copigmentation), intensifying and bluing the colour. Heat, light and oxygen degrade anthocyanins over time, and sulphur dioxide bleaches them reversibly, which matters in winemaking and in preserved fruit.
Anthocyanins are water-soluble and stored in the cell vacuole. Once cells are broken by cutting, freezing or cooking, the pigment leaks into any surrounding liquid. Boiled beetroot bleeds for a different reason (beetroot uses betalains), but boiled red cabbage, blackberries and purple beans all lose colour into the water, and purple-podded beans often turn green when cooked because their anthocyanin dissolves and the chlorophyll underneath shows through.
| Added to the extract | Approximate conditions | Typical colour | Dominant change |
|---|---|---|---|
| Lemon juice or vinegar | Strongly acidic | Pink to red | Red flavylium cation |
| Nothing (the extract itself) | Mildly acidic to near neutral | Purple | Mix of quinoidal and colourless forms |
| Pinch of bicarbonate | Mildly alkaline | Blue to blue-green | Blue quinoidal forms |
| Washing soda | Strongly alkaline | Green to yellow | Degradation to yellow products |
Each statement is labelled by kind — established fact, a standard’s requirement, observed market data, a convention, or Colourwise’s own interpretation or analysis — with the strength of the evidence behind it.
FactStrong evidence
At low pH anthocyanins exist mainly as the red flavylium cation; as pH rises towards 2–4 blue quinoidal species become more abundant, and at pH 5–6 colourless carbinol pseudobase and chalcone forms appear.
Caveat: The pH ranges at which each form dominates vary with the particular anthocyanin and its substituents.
Source: Anthocyanins: Factors Affecting Their Stability and Degradation
FactStrong evidence
Anthocyanins are water-soluble flavonoid glycosides stored in plant cell vacuoles, and their stability is affected by pH, temperature, light, oxygen and metal ions.
Source: Anthocyanins: Factors Affecting Their Stability and Degradation; Anthocyanidins and anthocyanins: colored pigments as food, pharmaceutical ingredients, and the potential health benefits
FactStrong evidence
Anthocyanins are authorised as a food colour in the EU under the number E 163.
Source: Food colours (topic page)
Reviewed 29 September 2026. Colourwise summarises its sources in its own words and does not reproduce standards text or proprietary colour data. Spotted an error? Tell us.