Via the economics blog Marginal Revolution, this excerpt from the book "Enemy of All Mankind" on Indian textile science:
What made Indian cotton unique was not the threads themselves, but rather their color. Making cotton fiber receptive to vibrant dyes like madder, henna, or turmeric was less a matter of inventing mechanical contraptions as it was dreaming up chemical experiments. The waxy cellulose of the cotton fiber naturally repels vegetable dyes….The process of transforming cotton into a fabric that can by dyed with shades other than indigo is known as “animalizing” the fiber, presumably because so much of it involves excretions from ordinary farm animals. First, dyes would bleach the fiber with sour milk; then they attacked it with a range of protein-heavy substances: goat urine, camel dung, blood. Metallic salts were then combined with the dyes to create a mordant that permeated the core of the fiber.
…The result was a [soft] fabric that could both display brilliant patterns of color and retain that color after multiple washings. No fabric in human history had combined those properties into a single cloth.
Sounds like the fabric workshops would be a joy to visit and smell. (What is the bleaching reagent in sour milk? the lactic acid?)