I had a game one night that was so muddy I considered throwing my uniform in the trash. My socks were solid brown. Knickers a complete mess.
I doused them in spray-on OxyClean and put them in a cold wash as soon as I got home. Once the washer filled I let it churn a couple of minutes then turned it off so everything could soak overnight. The next morning I let the cycle finish, then washed them in hot (not sure the temp) with lots of detergent and more OxyClean. I could not believe how white they were.
And unlike bleach, I haven't had OxyClean fade the black parts.