People have been dyeing clothes for thousands of years using a variety of natural dyes obtained mainly from plants, insects, marine animals and naturally occurring minerals. Coloured minerals obtained from rocks were mixed with water and oil to form mineral dyes e.g.
Many early dyes were very expensive to produce and as a results were only available to a small proportion of wealthy and powerful people who were able to afford clothes dyed with these brightly coloured dyes, most people would have to make do with either natural coloured cotton materials or clothes in shades of white or brown. However with the advent of the industrial revolution and the development of synthetic dyes, suddenly brightly coloured material was available to a much wider range of people due to a reduction in the cost of these new artificial dyes.
The development of synthetic dyes can be traced back to one compound, phenylamine (aniline) and one scientist in particular, Sir William Henry Perkins. In 1856 Perkins oxidised aniline with potassium dichromate and managed to extract a purple pigment or dye. This was the first synthetic dye. Like many scientific discoveries Perkins was not attempting to make a dye but was working on developing treatments for malaria, however he realised that his discovery would allow the development of new synthetic dyes to replace the expensive dyes obtained from plants and animals. It might seem strange to us today but at the time the production of these new synthetic dyes was a big deal! Perkin's new purple dye or mauve was hailed as a wonder dye. However large quantities of aniline and other chemicals would be needed to make this new synthetic wonder dye and other new dyes which were being developed. However the chemical industry needed to develop large amounts of the chemicals needed for these new dyes did not exist as yet.
Perkins synthesised the aniline needed to make his dye from benzene. The route he chose is probably familiar to you, the benzene was nitrated to form nitrobenzene which was then reduced by iron and concentrated hydrochloric acid to form phenylamine or aniline.
A few years after Perkins work on his dye mauve another scientist, the German organic chemist Johann Peter Griess in 1858 reacted primary aromatic amines such as phenylamine (aniline) with nitrous acid to form salts called arenediazonium salts, this reaction is called diazotisation. The discovery of these new diazonium salts was a key feature in the development of new synthetic dyes called azo dyes. Interestingly although Griess was German by birth he spent a good deal of his career working for Samuel Allsopp brewers in Burton upon Trent and unusually he kept his work on dyes and his work at the brewery separate from each other.
The ion [R−N+≡N]X− is called a diazonium ion, note R can be an aryl or alkyl group but alkyl diazonium salts are unstable and rapidly decompose to form nitrogen gas and a carbocation. Aryl diazonium salts are only stable if they are kept below 100C.
Aryl diazonium salts are more stable than alkyl diazonium salts simply because the positive charge on the nitrogen atoms can be partially stabilised by having it delocalised through the pi(π) electron delocalised system in the aromatic ring. The electrons in the p-orbitals on the nitrogen atoms can overlap with the p-orbitals in the aromatic ring which results in the delocalisation of the positive charge on the nitrogen atoms being spread through the aromatic ring. However the term stable is relative here, aryl diazonium salts are explosive when solid, due to the fact that they possess an excellent leaving group, the nitrogen molecule (N2), so they are always used in solution and never as a solid in the lab.
Nitrous acid (HNO2) is also unstable and is produced in situ (in the reaction vessel) by reacting sodium nitrite (NaNO2) with concentrated hydrochloric acid.
The reason that diazonium salts are so reactivity is due to the excellent ability of nitrogen gas (N2) to act as a leaving group. A variety of nucleophiles are able to displace nitrogen gas from diazonium salts. Some of these substitution reactions occur through free radical intermediates and some occur through the usual nucleophilic substitution route. Many different types of nucleophiles will substitute for the N2+ group including:
Arenediazonium salts will react or couple with activated aromatic rings to form coloured compounds called azo dyes, these dyes all contain the azo group (Ar-N=N-Ar). These are used to dye textiles as well as colourants in many paints, inks and plastics. Azo dyes have vibrant colours. The material to be dyed is soaked in a solution containing the soluble salt of the activated aromatic ring. The diazonium salt is the then added, this means that the azo dye forms on the material which makes it reasonable colour fast and not easily washed out of the fabric. The image below shows two common azo dyes:
These diazonium coupling reactions are typical electrophilic substitution reactions that you would expect from an aromatic substance. As an example consider phenol, which contains an activated aromatic ring. Here the positively charged diazonium ion is attacked by the electron rich aromatic ring in the phenol molecule. The phenol will join or couple with the diazonium ion to form hydroxyazobenzene crystals, which have a vibrant orange colour.
The coupling reaction nearly always takes place at the para position (position number 4 on the aromatic ring), although if this position is blocked by an attached substituent then ortho addition (addition to position 2) is also possible. The mechanism for this reaction is outlined in diagram below. You should notice that the product of the reaction, the azo dye has an extended conjugated system of alternate double and single bonds, in reality these double and single bonds will consist of delocalised electrons due to the overlap of neighbouring p-orbitals in the carbon and nitrogen atoms involved in the bonding. It is this conjugation which is responsible for the colour of the azo dyes. We would say that the conjugated system is a chromophores, that is they are light-absorbing parts of a molecule that can cause a compound to have a visible colour
In the mechanism below phenol is shown in the coupling reaction with the diazonium salt, however it would be simply to replace the phenol molecule with say phenylamine (aniline) which also contains an activated aromatic ring system.