Bleach did not stain the carpet. The black spots did. The purple spots come from the bleach not getting the stains you got on the carpet all the way out. Bleach does not add color, it takes color away. You can try bleach again to pull out the purple, you can replace the carpet, or you can live with purple spots.