Turn black pants inside out before washing and use cold water with similar dark colors. Avoid overloading the machine, which can increase fabric friction. Keeping dryer temperatures low can also help prevent fading and keep black pants looking darker.