The principal pigment in red cabbage is the chemical compound anthocyanin. Acid turns it red, and alkali a bluish purple. The cabbage is red to begin with because of its high acid content. When it is cooked for more than a brief period, much of its acid escapes into the air with the steam. When enough of the acid has dissipated, the alkali in the pot becomes predominant and turns the cabbage bluish purple. The harder the water, the greater its alkalinity, and therefore the more the cabbage discolors.
** Asian Recipes