Remove as much of the hair color as you can from your rug by soaking it up with several rags.
Take out a large bowl and pour in 2 cups of water. Add 1 tbsp. of detergent and 1 tbsp. of vinegar.
Soak up more of the hair dye by dipping a rag into the vinegar/detergent solution, squeezing out the liquid and dabbing the stain. Repeat this process once or twice.
Dry up the cleaning solution with a dry towel.
Drop on a few drops of rubbing alcohol if you can still see the hair color on your rug. Dry it with a rag immediately.
Check out the hair color stain. If you can still see it, even faintly, dump out your original cleaning solution, and replace it with 2 cups of water, 1 tsp. of detergent and 1 tbsp. of ammonia.
Drop several drops of this cleaning solution on the hair color stain. Do not dry it up. Instead, let it sit for about half an hour. As it dries, add more cleaning solution, which is usually every five minutes or so during the 30-minute period.
Rinse your rug with cool water. Then, dry with a towel.