Your carpet may have turned yellow due to the chemical called alachlor. Alachlor is a chemical that can react with other chemicals in the water to create a yellow color.