Test your new clothing as soon as you bring it home. Take a white washcloth, dampen it with warm water and rub it against the new clothes prior to washing them. If any color ends up on the washcloth, chances are the item will bleed in your washing machine.
Look at the tag on your new clothing. Many articles of clothing that have the potential for transferring color in the wash have tags or a sticker that indicate this. This is most common with jeans, and the tag will likely provide instructions to wash the article alone for the first few washes to prevent damage to your other clothing.
Fill a large bucket or clean sink with warm water and place a small amount of color safe bleach in the water. The directions on the bleach label will indicate the ratio for this. To make sure this mixture will not damage the clothes, test a small area with it to make sure no discoloration occurs. Let the clothing soak in the color safe bleach mixture for two to four hours and the wash according to the tag.
Use a dye fixative, available at most craft stores, if the color safe bleach option is not viable. This product washes away any lose dye in the fabric. Use it in place of your regular laundry detergent to wash the clothing on its own before adding it to your regular laundry rotation.
Test your clothing again after using the color safe bleach or dye fixative for color fastness. If the white washcloth comes up clean, there is little chance of the clothing bleeding in your washing machine. In the event that there is still color on the washcloth, repeat the process until there is no color transfer.
Use a color catch cloth in any loads of laundry that have colored clothing. This will help to soak up any stray dye and keep the rest of your clothes their original color.