Blot off any of the dye stain that is still wet. Use a clean paper towel, and do not rub.
Pretreat the stain with a pretreatment that you have bought, following the directions on the pretreatment.
Rinse the garment. If the stain is gone or the garment cannot be bleached, wash it normally.
If the stain is still there and the garment is white or color-safe, soak the entire garment in bleach. Rinse it thoroughly and wash normally once the stain is gone. If the stain is still there after 15 minutes, you probably cannot get rid of it.