Natural dyes from (A) birch: (1) leaves with alum mordant, (2) bark, (3) bark with iron mordant, (4) bark with alum mordant; (B) lichen (Lecanora tartarea).
A dye is a colored substance, natural or synthetic, which imparts its color to textiles to which it is applied and for which it has a chemical affinity. Dyes differ from pigments in being used in solution in an aqueous medium. To be satisfactory, the colors must be unaffected by water, soap, and sunlight.
Dyeing was practiced in the Fertile Crescent and in China by 3000 BC, using natural dyes obtained from plants and shellfish. These were virtually superseded by synthetic dyes – more varied in color and applicability – after the accidental discovery of mauve by William Perkin (1856). The raw materials are aromatic hydrocarbons obtained from coal tar and petroleum. These are modified by introducing chemical groups called chromophores which cause absorption of visible light (see also color). Other groups, auxochromes, such as amino or hydroxyl, are necessary for substantivity – i.e., affinity for the material to be dyed. This fixing to the fabric fibers is by hydrogen-bonding, adsorption, ionic bonding, or covalent bonding in the case of "reactive dyes." If there is no natural affinity, the dye may be fixed by using a mordant before or with dyeing. Vat dyes are made soluble by reduction in the presence of alkali, and after dyeing the original color is reformed by acidification and oxidation; indigo and anthraquinone are examples. Dyes are also used as biological stains and indicators, and in photography.