Reduction of dye consumption in the dyeing of textile by dye replacement