One thing in general is how clothing is dyed.
There are several different ways, but many go either alkaline to acidic or vise versa.
The dye molecules are usually present in one form, then chemicaly altered (usually a reduction reaction), brought into the clothing, then oxidized so they get "larger" and thus stick in the clothing.
One reaction usually happens in an alkaline environment, the other in a sour environment.
Same as hair dye, actually.
This is why oxygen bleach is often considered "color safe".
It tries to oxidize the already oxidized dyes and fails to do so effectively.
Many organic stains which contain dyes though are oxidize easy.
It will still have an effect, but far less so.
Point is that some dyes fair very good in alkaline washing environments, others don't.
It's a game of luck.
I found that alkalinity CAN have a huge impact.
I once on accident hued all my towels red.
I have one red dish towel that can be washed no problem with my other towels.
I had some sodium hydroxide laying around and added 2 tablespoons to the load.
Mistake.
Same with some black bedding.
Was perfectly fine with detergent at 60C.
With sodium hydroxide, grey in one wash.
It also has to do a lot with how the item looks.
Solid black is the worst, looks grey to me after one cd wash.
My grey stuff looks like new after years of washing.
My colored T-Shirts go in the whites all the time and look perfect.
The dark prints on the whites look worse.
In general you can say that the higher the temperature, the extremer the environment and the longer the exposure the more fading you get, no matter what.
All these factors push up solubility of EVERYTHING, just in plane general.
Question is just what will be dissolved quicker than something else.