Since most fabric is porous (wool or cotton fibers are organic) a dye needs to be pure enough in solution to penetrate and remain in the pores of each fiber. Fabric Dyeing is often confused with Fabric Painting, which causes a small amount of Dyeing but leaves most of the color on the surface of the fabric. Most dyes in history came from organic sources -- plants, animals, or minerals -- but modern dyes are largely synthetic, and offer a much wider range of color and longevity.
Fabric dyes have an Affinity for the Substrate of the fabric -- in other words, the dye sticks easily to the fabric surface. The measure of how well a dye adheres to a fabric is called "Color-Fastness." There are a number of different Dye Types; the most common are Acid Dyes, which absorb well in wools and silks, and are also used in safe Food Dyes. Direct Dyes need a reacting agent to adhere properly; Disperse Dyes cannot dissolve in water but adhere well to Polyester; Sulfur Dyes are a two-part solution used to dye cotton in dark colors.