Why does red cabbage change color with vinegar?

The key is a pigment inside the leaves.Red cabbage gets its color from a pigment called anthocyanin, which changes color depending on whether its surroundings are acidic or alkaline. Vinegar is acidic, so the purple color shifts toward red or pink. On the other hand, adding something alkaline, such as baking soda, shifts the color toward blue or green.

The color comes from anthocyanin
The color of red cabbage leaves comes from a pigment called anthocyanin. According to an explanation from a research institute at the University of Illinois, anthocyanin changes color depending on pH, a scale that shows how acidic or alkaline something is. A pH below 7 is acidic, and a pH above 7 is alkaline.
Red in acids, blue or green in alkalis
The same explanation says that the red cabbage pigment turns red at around pH 2, purple at 4, violet at 6, blue at 8, blue-green at 10, and greenish yellow at 12. Adding something acidic, such as vinegar or lemon juice, makes it reddish, while adding something alkaline, such as baking soda, moves the color toward blue or green.
Colors and numbers are based on an explanation from a research institute at the University of Illinois.

The molecule changes shape
An article by chemists at the University of St Andrews shows that, in the red cabbage pigment, the structure of the part of the molecule that creates the color takes a different shape in acidic, neutral and weakly alkaline conditions. Because the molecule changes its structure to match its surroundings, the color we see changes too.
How it differs from color changes when cooking
Color changes caused by heating are a different thing. According to teaching materials from Hong Kong's Education Bureau, anthocyanin is a pigment that dissolves in water, so when red cabbage is boiled, the pigment leaks into the water and the cabbage turns a dull reddish brown. The materials also explain that adding vinegar when cooking red cabbage keeps it from turning blue.
Trying it at home
To try it at home, boil chopped red cabbage in water for about 10 minutes, let it cool for at least 30 minutes, and strain it to get purple water. Pour it into a few clear glasses and add a little vinegar or baking soda to each to compare how the colors change. This uses hot water, so do it together with an adult.
Want to know more?
- Besides red cabbage, anthocyanin is also found in large amounts in blueberries and red cherries.
- In baked goods made with baking soda or baking powder, ingredients that contain anthocyanin sometimes turn bluish.
- It has been reported that petals of roses and pansies can also be used to make a pigment liquid that changes color like red cabbage.

Quick quiz: test yourself
What color does red cabbage juice turn with vinegar?
Show the answer
- Red or pink
- Blue or green
- Yellow
Red or pink Its pigment, anthocyanin, changes color in acids and alkalis. Vinegar is acidic, so it turns red or pink; baking soda turns it blue or green.
Its pigment, anthocyanin, changes color in acids and alkalis. Vinegar is acidic, so it turns red or pink; baking soda turns it blue or green.
Next quiz ›Sources
- Red Cabbage pH Indicator (At-Home Activity)Carl R. Woese Institute for Genomic Biology, University of Illinois Urbana-Champaign
- Aqueous red cabbage extracts: More than just a pH indicatorChemical Education Xchange (Iain A. Smellie ほか, University of St Andrews)
- STEM in Food Science in Technology and Living: Fruits & VegetablesEducation Bureau, Hong Kong SAR Government
This article was written after checking the sources above as of 2026-10-03. Explanations may change as research progresses. Photo credits are shown below each photo.



