I swear by Cheer, even though they stopped advertizing that it stops fading. I haven't had a problem with fading since I started using it, several years ago. Not even on my cottons, which are notorious for fading. It's not a baby detergent though. It does have fragrance and dye.
The only clothes I've ever had pill are 100% polyester or acrylic. I never wear those materials for that reason, along with the fact they aren't very breathable and hold odor like you wouldn't believe.
Heat from the dryers also causes fading, too, especially on natural fabrics like cottons, denim, wool, linen. I had three of the same, all cotton t-shirts, in a bright blue, that I hung to dry for years. Never faded because I use Cheer and wash in cold water. One of the t-shirts accidentally went in the dryer. Immediately after that ONE time, when I pulled it out of the dryer, I noticed it had faded about 20%. Grr!

I laid it against the other two t-shirts that were in the same wash load but line dried, yep, the fading was quite noticeable.
Washing natural fabric clothes in too hot a temperature can cause fading too. The only thing I wash in hot water and throw in the dryer are whites and sheets. Everything else gets washed in cold water. And only stuff I don't care about fading, from that pile, get tossed in the dryer.