Use Mr. Clean in a Rug Doctor carpet shampooer. Cheaper than the brand name solution. $3 v/s $20. My carpets are off white. The color in this solution will NOT stain your carpet. See the treated side of the cola stain? I used Mr. Clean 'Gain' scented. My whole house smells like Gain dryers sheets! Use 1/2 cup of Mr. Clean per 2 gallons of hot water.
A friend that owns rental property told me to try Tide with Bleach Alternative in my hot water carpet cleaning machine as one last try before I ripped up the carpet. She swears by it being the best thing ever so I tried it. S I put Tide in my Rug Doctor with water just like normal carpet shampoo. It saved 900 sq ft of carpet plus a matching carpeted stairway. I would strongly suggest trying a very small spot in the corner on colored carpets as you don't know if it would fade carpet fibers.