The most effective method for making fabric colorfast is to follow all the care instructions given on the fabric or garment label. It is also helpful to follow the guidelines given on the detergent product.
Another popular method is to use salt and vinegar. The only ingredients needed for this method are salt, vinegar and water. Put your item into the solution and move it around vigorously until the salt disappears. Leave your clothes in the solution for 24 hours, rinse your items until the water is running clear and send it in the cycle with other items of clothing for the best results.