Why does red cabbage change color with vinegar?

Kohaku
KohakuHave you ever been surprised to see red cabbage suddenly change color when you added vinegar?
The answer in 30 seconds
KohakuThe 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.

A row of test tubes filled with red cabbage pigment liquid, showing colors from blue-purple, red and pink to green and yellow
When liquids with different properties are added to red cabbage pigment liquid, it changes to red, green, yellow and other colors.Photo: Yves.brenner / CC BY-SA 3.0 (cropped) / Wikimedia Commons

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.

Figure: How red cabbage color changes with pH
Red cabbage color by pHpH2RedpH4PurplepH6VioletpH8BluepH10Blue-greenpH12Greenish yellowBelow 7: acidicVinegar, lemon juice → reddishAbove 7: alkalineBaking soda → blue or green

Colors and numbers are based on an explanation from a research institute at the University of Illinois.

Kohaku
KohakuDepending on the pH, the color changes all the way from red to greenish yellow. Isn't that amazing?

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.
Kohaku
KohakuReddish with vinegar, toward blue or green with baking soda. It is a little bit of kitchen chemistry, where the pigment molecule changes its structure.

Quick quiz: test yourself

What color does red cabbage juice turn with vinegar?

Show the answer
  1. Red or pink
  2. Blue or green
  3. 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.

Sources

  1. Red Cabbage pH Indicator (At-Home Activity)Carl R. Woese Institute for Genomic Biology, University of Illinois Urbana-Champaign
  2. Aqueous red cabbage extracts: More than just a pH indicatorChemical Education Xchange (Iain A. Smellie ほか, University of St Andrews)
  3. 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.