Azo violet

Azo violet (Magneson I; p-nitrobenzeneazoresorcinol) is an azo compound with the chemical formula C12H9N3O4. 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. Azo violet may also be used to test for the presence of ammonium ions. The color of ammonium chloride or ammonium hydroxide solution will vary depending upon the concentration of azo violet used. Magneson I is used to test Be also; it produces an orange-red lake with Be(II) in alkaline medium.

Properties
The intense color from which the compound gets its name results from irradiation and subsequent excitation and relaxation of the extended π electron system across the R-N=N-R' linked phenols. Absorption of these electrons falls in the visible region of the electromagnetic spectrum. Azo violet's intense indigo color (λmax 432 nm) approximates Pantone R: 102 G: 15 B: 240.

Synthesis
Azo violet can be synthesised by reacting 4-nitroaniline with nitrous acid (generated in situ with an acid and a nitrite salt) to produce a diazonium intermediate. This is then reacted with resorcinol, dissolved in a sodium hydroxide solution, via an azo coupling reaction.
 * Azo Violet Synthesis.svg

This is consistent with the generalized strategy for preparing azo dyes.
 * Generalized Azo Dye Synthesis.jpeg

Reactivity
The chemical character of azo violet may be attributed to its azo group (-N=N-), six-membered rings, and hydroxyl side groups. Due to steric repulsions, azo violet is most stable in the trans-configuration, but isomerization of azo dyes by irradiation is not uncommon. The para-position tautomerization of azo violet provides mechanical insight into the behavior of the compound in an acidic environment, and thus its use as a basic pH indicator.

The predicted 1H-NMR of pure azo violet shows the hydroxyl protons as the most deshielded and acidic protons. The participation of these hydroxyl groups' electron-donation to the conjugated π system likewise influences azo violet's λmax and pKa value.