Both dyes and pigments appear to be colored because they absorb some wavelengths of light more than others. In contrast with a dye, a pigment generally is insoluble, and has no affinity for the substrate. Some dyes can be precipitated with an inert salt to produce a lake pigment, and based on the salt used they could be aluminum lake, calcium lake or barium lake pigments.

Natural dye[edit]

The majority of natural dyes are from plant sources – roots, berries, bark, leaves, and wood, fungi, and lichens. 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 raised commercially and 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.[citation needed]

The discovery of man-made synthetic dyes late in the 19th century ended the large-scale market for natural dyes.

Synthetic dyes quickly replaced the traditional natural dyes. They cost less, they offered a vast range of new colors, and they imparted better properties to the dyed materials.[5] Dyes are now classified according to how they are used in the dyeing process.

Dye types[edit]

Acid dyes are water-solubleanionic 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.

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 dyebath to help the uptake of the dye onto the fiber. Basic dyes are also used in the coloration of paper.

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 alkalimetalsalt of the dye, which, in this leuco form, 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 fibre 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 fibres. In some cases, a dyeing temperature of 130 °C (266 °F) is required, and a pressurised dyebath is used. The very fine particle size gives a large surface area that aids dissolution to allow uptake by the fibre. 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 fibre. This is achieved by treating a fibre 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 two part "developed" dyes used to dye cotton with dark colors. The initial bath imparts a yellow or pale chartreuse color, This is aftertreated with a sulfur compound in place to produce the dark black we are familiar with in socks for instance. Sulfur Black 1 is the largest selling dye by volume.

Food dyes[edit]

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.