The trick is to use an advanced filter which I also didn’t know too much about until your question Then you intersect the current customer’s favorite color from repeating group with this shirt’s available color from the filter and get the ones with count greater than 0.
The inner repeating group will have this filter:
And here is the output: