If you’re using diluted hydrogen peroxide of 3% concentration, that’s going to work fine to remove color stains off your carpet. Hydrogen peroxide solutions with concentrations of 6% or higher can damage your carpet and may even bleach out its dyes.