It is used commercially as a violet dye and experimentally as a pH indicator, turning blue-purple in the presence of magnesium salt in a slightly alkaline, or basic, environment.
It is used commercially as a violet dye and experimentally as a pH indicator, appearing yellow below pH 11, and violet above pH 13. It also turns deep blue in the presence of magnesium salt in a slightly alkaline, or basic, environment.