It is possible to minimize bleeding in laundry by testing colors before washing and also washing dark colors separately in cold water. Clothes with dyes that bleed probably need to be hand washed or dry cleaned to keep the colors bright.
Many old wives' tales call for soaking bright clothes with non-colorfast dyes in salt and/or vinegar or adding salt to the wash cycle to set the dyes. Unfortunately, these home remedies do not work and can harm the clothes being washed. In addition, using salt in a washing machine can cause it to rust.
A better idea is to test the colorfastness of the garment in question by soaking an inside seam in cold water, then pressing the seam to a paper towel. If the color bleeds, the garment is not colorfast and requires special handling. Clothes with bright or dark colors or those with non-colorfast dyes should be turned inside out and washed in cold water only. If possible, similar colors should be washed together. Some dyes that bleed initially typically stop bleeding after being washed a few times; this is common with denim clothing. Non-colorfast garments should be hand washed or taken to the dry cleaners depending on the care tag instructions.