The color gives away the substance.
Colorimetrics is a widely used method for determine the presence of chemical compounds which uses a process of applying a colorimetric reagent to a unknown sample to observe a visible color reaction. The best-known colour reaction is the litmus test, which shows a particular colour change dependent on the pH-value.
The red cabbage’s pigment (anthocyanin) also reacts dependent on the pH-value. When the red cabbage grows in acid soil, it will show a red colour; growing in alkaline soil gives it a bluish colour. The regionally different preparation of the cabbage - adding vinegar (acid) or baking soda (alkaline) - also leads to a colour change to red or blue. This is why the same vegetable is known as “Blaukraut” (blue cabbage) in Southern Germany and as “Rotkraut” (red cabbage) in Northern Germany.
Over time, more and more colour reactions were discovered, which under specific conditions and in the presence of particular substances, cause a colour change. In practice, this colour reaction has been taken advantage of. The specific colouring of the solution in a colour reaction serves as an indicator for the identification of a particular substance.
In some cases, the dyed solution can be compared to a colour chart and the concentration of the substance can even be determined via a match. Depending on the area of application, different samples can be analysed. It is possible to identify a contamination of bodies of water or soil samples with foreign ions such as lead (Pb2+), nickel (Ni2+) or chromium (Cr6+), or to test different surfaces such as the skin of a suspect, plant parts, powders or pills for residues of narcotics or explosives.