pH-Induced Changes in the Molecular Structure and Color of Anthocyanin Dyes
Cyanidin is a typical anthocyanin molecule found in red cabbage juice, fruits and flowers. This Demonstration shows how its molecular structure changes according to the pH of the surrounding chemical environment. As a response to this microscopic change, the color of the anthocyanin solution is also affected [1, 2]. This pH-responsive phenomenon, called halochromism, is why these compounds are used as natural pH indicators. Their color range can span from red (i.e. acid solutions with pH ⪡ 4) to yellow (extremely basic environments with pH ⪢ 7). As a further application, this property can be used to monitor the quality and safety of packaged food [3, 4] by using anthocyanins as dyes. Natural pH indicators such as litmus paper can exhibit different color scales depending on pH.[more]
You can tune the pH from 1 to 14 by using the "pH indicator gauge" slider; the color scale chosen for cyanidin is displayed by the fully customized BulletGauge indicator shown in the upper part of the output section alongside the chemical nomenclature for the molecular ionic species (e.g. flavylium cation). The corresponding molecular structure is shown in the lower part according to the selected options (2D or 3D visualization, with or without indices and with or without hydrogen atoms in the 2D molecular plot).
The corresponding molecular structures have been plotted starting from the corresponding Simplified Molecular Input Line Entry Specification (SMILES) reported in the Initialization section. Since it is not easy for chemoinformatics beginners to devise the correct SMILES string for complex organic molecules like anthocyanins, the AI-based web application Decimer  has been used to associate the correct SMILES string to the screenshots of molecular structures depicted in the references.[less]
 Wikipedia. "Anthocyanin." (Aug 11, 2023) en.wikipedia.org/wiki/Anthocyanin.
 German Wikipedia. "Cyanidin." (Aug 11, 2023) de.wikipedia.org/wiki/Cyanidin.
 R. Priyadarshi, P. Ezati and J.-W. Rhim, "Recent Advances in Intelligent Food Packaging Applications Using Natural Food Colorants," ACS Food Science & Technology, 1(2), 2021 pp. 124–138. doi:10.1021/acsfoodscitech.0c00039.
 R. Abedi-Firoozjah, S. Yousefi, M. Heydari, F. Seyedfatehi, S. Jafarzadeh, R. Mohammadi, M. Rouhi and F. Garavand, "Application of Red Cabbage Anthocyanins as pH-Sensitive Pigments in Smart Food Packaging and Sensors," Polymers, 14(8), 2022 pp. 1629–1649. doi:10.3390/polym14081629.
 "Decimer." (Aug 11, 2023) decimer.ai.