Sorting places like pieces of clothing together for separate loads of laundry. By placing all white fabrics with all other white fabrics, you eliminate any color that may bleed into the whites.
Light colors can often safely go together in a cold or warm load because they are less likely to bleed. Wash lightly soiled, bright colors in cold water to prevent bleeding.
New clothing should be washed separately with like colors. For example, wash a brand new red T-shirt with other pinks and reds.
If the dye does bleed, the other clothes will not be affected.
Testing for Colorfastness
The Southern Illinois University student newspaper "The Alestle" recommends checking clothes for colorfastness by placing a wet cotton swab on the inner seam of a colored garment. If it doesn't bleed onto the cotton swab, chances are that it will not bleed into the laundry.
If it does bleed, "The Alestle" suggests washing it in cold water by itself.
Textile Industry Affairs suggests drying clothes immediately to prevent the color from one damp garment transferring onto another damp garment. A red T-shirt does not have to be washed with a white shirt to damage it.
Left touching each other, the bleeding red T-shirt transfers color spots and streaks onto the white.
When you first discover that color has bled in your laundry, do not dry it. Drying sets the dye into the stained fabric.
Immediately separate out the stained garments, pre-treat with a stain remover and wash in warm water. If stained whites do not return to their previous white color, use a commercial color remover according to package directions.