Here's how it works:
* Diphenylamine itself is colorless.
* Nitric acid is a powerful oxidizer. It readily removes electrons from other molecules.
* When nitric acid reacts with diphenylamine, it oxidizes the diphenylamine molecule. This oxidation process leads to the formation of a colored species, which appears blue.
This reaction is often used as a test for the presence of nitric acid. The blue color is a strong indicator that nitric acid is present.