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, 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.
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. The dyes were obtained from animal, vegetable or mineral origin, with none to very little processing. By far the greatest source of dyes has been from the plant kingdom, notably roots, berries, bark, leaves and wood, but only a few have ever been used on a commercial scale.
The discovery of man-made synthetic dyes late in the 19th century ended the large-scale market for natural dyes.
Synthetic dyes are man-made. These dyes are made from petroleum, sometimes in combination with mineral-derived components.