By maintaining a low temperature in an ice bath are added in equimolar amounts a) pure aniline $ C_6H_5NH_2$ b) a moderately concentrated solution of $HCl $ c) a sodium nitrite solution $ Na^+ + NO_2^- $:
Extract of a video due to PR840
This forms a solution of benzenediazonium chloride:
Benzenediazonium ion is an electrophile which can be coupled to activated benzene rings, for example that of the phenolate ion:
The electrophilic attack of benzenediazonium takes place in an activated position by mesomerism, for example here on the para position of phenolate ion:
($\Phi$ = aromatic benzene ring) The reaction leads to widely used azo dyes :
Extract of a video due to PR840
The video shows the reactions of the benzene diazonium solution in a basic medium with 1) phenol $C_6H_5OH $ to obtain an orange dye of formula
1) resorcinol $ C_6H_4(OH)_2 $ to obtain a red dye of formula
1) salicylic acid $C_6H_4(OH)COOH $ to obtain a brown dye of formula