Until the middle of the 19th century, textiles were dyed exclusively using natural materials. Modern synthetic dye production, however, requires a series of chemical reactions.
The first synthetic dye, mauve, was discovered in 1856 by William Henry Perkin as he attempted to synthesise quinine. Mauve was an aniline dye, derived from a poisonous, oily, organic compound---in other words, a carbon compound---called aniline (C6H5NH2).
Modern synthetic dyes are exclusively organic compounds. Developments in dye chemistry and finishing methods have produced a range of synthetic dyes that are easy to handle and colour-fast. The range includes acid dyes, azoic dyes and chrome or mordant dyes.
Indigo---a blue dye used to dye jeans---was originally a plant extract but is now produced by the reaction of sodamide with phenylglycine at a temperature of 200 degrees Celsius to produce indoxyl, which reacts with oxygen to form indigo dye.