Dyeing yarn before tufting or weaving it into carpet.