Dyeing is the application of dyes or pigments to textile materials such as fibers, yarns, and fabrics to achieve color with desired color fastness. Dyeing is normally done in a special solution containing dyes and chemicals.

Temperature and time are key factors that control how dye molecules attach to fiber through absorption, diffusion, or bonding.

A dye’s primary source has traditionally been nature, with dyes extracted from animals or plants. In the mid-19th century, however, humans developed artificial dyes to achieve a broader color spectrum and to make dyes more washable and durable.

Different classes of dyes are used for different types of fiber and at different stages of the textile production process. This includes loose fibers through yarn and cloth to complete garments.

Dyeing can be applied at various stages within the textile manufacturing process. The stage at which a product is dyed varies depending on its intended end use, the cost to the manufacturer, its desired appearance, and the resources available.  Dying methods can be described in a variety of ways, such as:

In dope dyeing, pigments are added to the polymer solution itself before extruding the fibers. The process provides the dyed fibers with excellent fastness properties. The dope dyeing applies to synthetic fiber only. The dope dyeing method is also known as solution dyeing and 'mass coloration' or 'mass colored'. It has limited color options.

In fiber dyeing, dyeing occurs at the fiber stage before being spun into yarn and the method is also called stock dyeing. A melange or medley is an example of this.

The yarns are dyed before the fabric is manufactured. Yarn dyeing happens in hanks or packages. Package dyeing is a method where yarns are wound on perforated cones placed in a dye vessel. The dye solution is then alternatively pushed inside out and vice versa. Stripes, patterned (checks), and jacquard-design fabrics are examples.

After making fabrics with undyed yarns, piece dyeing takes place. Most of the solid dyed fabrics are dyed with the piece dyeing method, and the materials are also called piece dyed.

In garment dyeing, the garments are constructed of undyed, but ready-for-dyeing, fabrics.