Reversible transformations can be caused by heat, light or pH, resulting in examples of thermochromism, photochromism and halochromism, respectively.
Leuco dyes form the basis of thermal printer papers and certain pH indicators.
The reduction step is typically achieved with sodium dithionite, hydroxyacetone and hydrogen, or by electrochemical methods.
After protonating a part of the molecule, irradiation with UV light (see Photochromism), or introducing other kind of such change, the bond between the spiro carbon and the oxazine interrupts, the ring opens, the spiro carbon achieves sp2 hybridization and becomes planar, the aromatic group rotates, aligns its π-orbitals with the rest of the molecule, and a conjugated system forms, with ability to absorb photons of visible light, and therefore appear colorful.
[1] Other examples are phenolphthalein and thymolphthalein, colorless in acidic to neutral pH, but becoming pink and blue in alkaline environment.