If your dog or cat loses its lunch on the carpet leaving a red stain, it is the red dye from their food. Switch to a neutral color food to end this problem. Dogs and cats are colorblind. They can't see the red in their food.
Red dye is also found in punch, Popsicles, Kool-Aid and candles that are red or purple in color. Prevent these stains by switching to a different color. Do your health a favor and eat frozen fruit like ripe bananas and grapes for snacks instead of sugar laden Kool-Aid and Popsicles.
Pour peroxide on the stain. Wait 30 minutes, rinse with vinegar and water then plain water. Repeat if needed. Peroxide might take the color out of some fabrics. Test for color fastness first.