red cabbage contains a water-soluble pigment called anthocyanin that changes colour when it’s mixed with an acid or a base. It turns red in acidic environments with a pH less than 7 and turns blueish-green in alkaline (basic) environments with a pH greater than 7.