How fabric is dyed and why the colour stays
Short answer: The colour bonds to the fibre in a hot bath. The bond decides whether the colour holds. Excess dye that has not bonded washes out in the first few washes.
The colour has to bond chemically
A colour that only sits on the surface washes out. See bamboo clothing for women.
Excess is rinsed out after dyeing
The more thorough the rinsing, the less a new garment transfers colour. See bamboo t-shirts for women.
Dark colours use the most dye
That is why dark clothes transfer most in the first washes. See bamboo underwear for women.
Yarn dyeing versus piece dyeing
Dyeing the yarn before knitting gives a more even colour than dyeing the finished fabric. See bamboo tops for women.
Frequently asked questions
Why does new clothing transfer colour?
Because excess dye that has not bonded to the fibre is rinsed out in the first few washes.
Why do dark clothes transfer most?
Because dark colours need the most dye. That leaves more excess to rinse out.
What is the difference between yarn dyeing and piece dyeing?
In yarn dyeing the yarn is dyed before knitting. That gives a more even colour than dyeing the finished fabric.