A dye is a colored substance that chemically bonds to the substrate to which it is being applied. This distinguishes dyes from pigments which do not chemically bind to the material they color. Dye is generally applied in an aqueous solution, and may require a mordant to improve the fastness of the dye on the fiber. 
Both dyes and pigments are colored, because they absorb only some wavelengths of visible light. Dyes are usually soluble in water whereas pigments are insoluble. Some dyes can be rendered insoluble with the addition of salt to produce a lake pigment.
The majority of natural dyes are derived from plant sources: roots, berries, bark, leaves, wood, fungi and lichens.  In the 21st century, most dyes are synthetic, i.e., are man-made from petrochemicals.[ citation needed] The process was pioneered by J. Pullar and Sons in Scotland.  Other than pigmentation, they have a range of applications including organic dye lasers,  optical media ( CD-R) and camera sensors ( color filter array).
Textile dyeing dates back to the Neolithic period. Throughout history, people have dyed their textiles using common, locally available materials. Scarce dyestuffs that produced brilliant and permanent colors such as the natural invertebrate dyes Tyrian purple and crimson kermes were highly prized luxury items in the ancient and medieval world. Plant-based dyes such as woad, indigo, saffron, and madder were important trade goods in the economies of Asia and Europe. Across Asia and Africa, patterned fabrics were produced using resist dyeing techniques to control the absorption of color in piece-dyed cloth. Dyes from the New World such as cochineal and logwood were brought to Europe by the Spanish treasure fleets,  and the dyestuffs of Europe were carried by colonists to America. 
Dyed flax fibers have been found in the Republic of Georgia in a prehistoric cave dated to 36,000 BP.   Archaeological evidence shows that, particularly in India and Phoenicia, dyeing has been widely carried out for over 5,000 years. Early dyes were obtained from animal, vegetable or mineral sources, with no to very little processing. By far the greatest source of dyes has been from the plant kingdom, notably roots, berries, bark, leaves and wood, only few of which are used on a commercial scale.
The first synthetic dye, mauve, was discovered serendipitously by William Henry Perkin in 1856.   The discovery of mauveine started a surge in synthetic dyes and in organic chemistry in general. Other aniline dyes followed, such as fuchsine, safranine, and induline. Many thousands of synthetic dyes have since been prepared.   
The discovery of mauve also led to developments within immunology and chemotherapy. In 1863 the forerunner to Bayer AG was formed in what became Wuppertal, Germany. In 1891 Paul Ehrlich discovered that certain cells or organisms took up certain dyes selectively. He then reasoned that a sufficiently large dose could be injected to kill pathogenic microorganisms, if the dye did not affect other cells. Ehrlich went on to use a compound to target syphilis, the first time a chemical was used in order to selectively kill bacteria in the body, he also used methylene blue to target the plasmodium responsible for malaria. 
The color of a dye is dependent upon the ability of the substance to absorb light within the visible region of the electromagnetic spectrum (380-750 nm). An earlier theory known as Witt theory stated that a colored dye had two components, a chromophore which imparts color by absorbing light in the visible region (some examples are nitro, azo, quinoid groups) and an auxochrome which serves to deepen the color. This theory has been superseded by modern electronic structure theory which states that the color in dyes is due to excitation of valence π-electrons by visible light. 
Dyes are classified according to their solubility and chemical properties. 
Acid dyes are water- soluble anionic dyes that are applied to fibers such as silk, wool, nylon and modified acrylic fibers using neutral to acid dye baths. Attachment to the fiber is attributed, at least partly, to salt formation between anionic groups in the dyes and cationic groups in the fiber. Acid dyes are not substantive to cellulosic fibers. Most synthetic food colors fall in this category. Examples of acid dye are Alizarine Pure Blue B, Acid red 88, etc.
Basic dyes are water-soluble cationic dyes that are mainly applied to acrylic fibers, but find some use for wool and silk. Usually acetic acid is added to the dye bath to help the uptake of the dye onto the fiber. Basic dyes are also used in the coloration of paper.
Direct or substantive dyeing is normally carried out in a neutral or slightly alkaline dye bath, at or near boiling point, with the addition of either sodium chloride (NaCl) or sodium sulfate (Na2SO4) or sodium carbonate (Na2CO3). Direct dyes are used on cotton, paper, leather, wool, silk and nylon. They are also used as pH indicators and as biological stains.
Mordant dyes require a mordant, which improves the fastness of the dye against water, light and perspiration. The choice of mordant is very important as different mordants can change the final color significantly. Most natural dyes are mordant dyes and there is therefore a large literature base describing dyeing techniques. The most important mordant dyes are the synthetic mordant dyes, or chrome dyes, used for wool; these comprise some 30% of dyes used for wool, and are especially useful for black and navy shades. The mordant potassium dichromate is applied as an after-treatment. It is important to note that many mordants, particularly those in the heavy metal category, can be hazardous to health and extreme care must be taken in using them.
Vat dyes are essentially insoluble in water and incapable of dyeing fibres directly. However, reduction in alkaline liquor produces the water-soluble alkali metal salt of the dye. This form is often colorless, in which case it is referred to as a Leuco dye, and has an affinity for the textile fibre. Subsequent oxidation reforms the original insoluble dye. The color of denim is due to indigo, the original vat dye.
Reactive dyes utilize a chromophore attached to a substituent that is capable of directly reacting with the fiber substrate. The covalent bonds that attach reactive dye to natural fibers make them among the most permanent of dyes. "Cold" reactive dyes, such as Procion MX, Cibacron F, and Drimarene K, are very easy to use because the dye can be applied at room temperature. Reactive dyes are by far the best choice for dyeing cotton and other cellulose fibers at home or in the art studio.
Disperse dyes were originally developed for the dyeing of cellulose acetate, and are water-insoluble. The dyes are finely ground in the presence of a dispersing agent and sold as a paste, or spray-dried and sold as a powder. Their main use is to dye polyester, but they can also be used to dye nylon, cellulose triacetate, and acrylic fibers. In some cases, a dyeing temperature of 130 °C (266 °F) is required, and a pressurized dyebath is used. The very fine particle size gives a large surface area that aids dissolution to allow uptake by the fiber. The dyeing rate can be significantly influenced by the choice of dispersing agent used during the grinding.
Azoic dyeing is a technique in which an insoluble Azo dye is produced directly onto or within the fiber. This is achieved by treating a fiber with both diazoic and coupling components. With suitable adjustment of dyebath conditions the two components react to produce the required insoluble azo dye. This technique of dyeing is unique, in that the final color is controlled by the choice of the diazoic and coupling components. This method of dyeing cotton is declining in importance due to the toxic nature of the chemicals used.
Sulfur dyes are inexpensive dyes used to dye cotton with dark colors. Dyeing is effected by heating the fabric in a solution of an organic compound, typically a nitrophenol derivative, and sulfide or polysulfide. The organic compound reacts with the sulfide source to form dark colors that adhere to the fabric. Sulfur Black 1, the largest selling dye by volume, does not have a well defined chemical structure.
Some dyes commonly used in Staining:
|Basic Dyes||Acidic Dyes|
|Basic Fuchsin||Acid Fuchsin|
|Crystal violet||Congo Red|
One other class that describes the role of dyes, rather than their mode of use, is the food dye. Because food dyes are classed as food additives, they are manufactured to a higher standard than some industrial dyes. Food dyes can be direct, mordant and vat dyes, and their use is strictly controlled by legislation. Many are azo dyes, although anthraquinone and triphenylmethane compounds are used for colors such as green and blue. Some naturally occurring dyes are also used.[ citation needed]
A number of other classes have also been established, including:
- Oxidation bases, for mainly hair and fur
- Laser dyes: rhodamine 6G and coumarin dyes. 
- Leather dyes, for leather
- Fluorescent brighteners, for textile fibres and paper
- Solvent dyes, for wood staining and producing colored lacquers, solvent inks, coloring oils, waxes.
- Contrast dyes, injected for magnetic resonance imaging, are essentially the same as clothing dye except they are coupled to an agent that has strong paramagnetic properties. 
- Mayhems dye, used in water cooling for looks, often rebranded RIT dye
- Category:Acridine dyes, derivates of acridine
- Category:Anthraquinone dyes, derivates of anthraquinone
- Arylmethane dyes
- Category:Azo dyes, based on -N=N- azo structure
- Phthalocyanine dyes, derivatives of phthalocyanine
- Quinone-imine dyes, derivatives of quinone
- Category:Thiazole dyes
- Category:Safranin dyes
- Xanthene dyes
Dyes produced by the textile, printing and paper industries are a source of pollution of rivers and waterways.  An estimated 700,000 tons of dyestuffs are produced annually (1990 data). The disposal of that material has received much attention, using chemical and biological means. 
- Steingruber, Elmar (2004). "Indigo and Indigo Colorants". Ullmann's Encyclopedia of Industrial Chemistry. Weinheim: Wiley-VCH. doi: 10.1002/14356007.a14_149.pub2. ISBN 3527306730.
- Booth, Gerald (2000). "Dyes, General Survey". Ullmann's Encyclopedia of Industrial Chemistry. Wiley-VCH. doi: 10.1002/14356007.a09_073. ISBN 3527306730.
- Burgess, Rebecca (8 November 2017). Harvesting Color: How to Find Plants and Make Natural Dyes. Artisan Books. ISBN 9781579654252. Retrieved 8 November 2017 – via Google Books.
- John Pullar (1803–1878) - The Courier & Advertiser, 7 June 2016
- Silfvast, William T. (21 July 2008). Laser Fundamentals. Cambridge University Press. ISBN 9781139855570. Retrieved 8 November 2017 – via Google Books.
- Castillejo, Marta; Moreno, Pablo; Oujja, Mohamed; et al. (15 August 2008). Lasers in the Conservation of Artworks: Proceedings of the International Conference Lacona VII, Madrid, Spain, 17 - 21 September 2007. CRC Press. ISBN 9780203882085. Retrieved 8 November 2017 – via Google Books.
- Adrosko, Rita J. (8 November 1971). Natural Dyes and Home Dyeing (formerly Titled: Natural Dyes in the United States). Courier Corporation. ISBN 9780486226880. Retrieved 8 November 2017 – via Google Books.
- Balter, M (2009). "Clothes Make the (Hu) Man". Science. 325 (5946): 1329. doi: 10.1126/science.325_1329a. PMID 19745126.
- Kvavadze, E; Bar-Yosef, O; Belfer-Cohen, A; et al. (2009). "30,000-Year-Old Wild Flax Fibers". Science. 325 (5946): 1359. Bibcode: 2009Sci...325.1359K. doi: 10.1126/science.1175404. PMID 19745144. S2CID 206520793. Supporting Online Material
- Hubner, K. (2006). "History – 150 Years of mauveine". Chemie in Unserer Zeit. 40 (4): 274–275. doi: 10.1002/ciuz.200690054.
- Anthony S. Travis (1990). "Perkin's Mauve: Ancestor of the Organic Chemical Industry". Technology and Culture. 31 (1): 51–82. doi: 10.2307/3105760. JSTOR 3105760.
- Hunger, K., ed. (2003). Industrial Dyes. Chemistry, Properties, Applications. Weinheim: Wiley-VCH.
- Zollinger, H. (2003). Color Chemistry. Synthesis, Properties and Applications of Organic Dyes and Pigments, 3rd ed. Weinheim: Wiley-VCH.
- Zollinger, Heinrich (2003). Syntheses, Properties, and Applications of Organic Dyes and Pigments. ISBN 9783906390239.
- Burrows, A.; Holman, J.; Parsons, A.; Pilling, G.; Price, G. (2009). Chemistry³: Introducing inorganic, organic and physical chemistry. OUP Oxford. pp. 1005–1006. ISBN 978-0-19-927789-6. Retrieved February 26, 2021.
- Bafana, Amit; Devi, Sivanesan Saravana; Chakrabarti, Tapan (2011-09-28). "Azo dyes: past, present and the future". Environmental Reviews. 19 (NA): 350–371. doi: 10.1139/a11-018. ISSN 1181-8700.
- Duarte, F. J.; Hillman, L. W., eds. (1990). Dye Laser Principles. Academic. New York.
- "patentstorm.us". Patentstorm.us. Archived from the original on 12 June 2011. Retrieved 8 November 2017.
- Llewellyn, Bryan D. "Stainsfile - Dye index". Stainsfile.info. Archived from the original on 16 April 2008. Retrieved 8 November 2017.
- Brindley, Lewis (July 2009). "New solution for dye wastewater pollution". Chemistry World. Retrieved 2018-07-08.
- Xu, Xiang-Rong; Li, Hua-Bin; Wang, Wen-Hua; Gu, Ji-Dong (2004). "Degradation of dyes in aqueous solutions by the Fenton process". Chemosphere. 57 (7): 595–600. Bibcode: 2004Chmsp..57..595X. doi: 10.1016/j.chemosphere.2004.07.030. PMID 15488921.
|Look up leuco form in Wiktionary, the free dictionary.|
- Abelshauser, Werner. German History and Global Enterprise: BASF: The History of a Company (2004) covers 1865 to 2000
- Beer, John J. The Emergence of the German Dye Industry (1959)