How to only let some players wear certain armor.

Let's say I have two teams, red team and blue team. And each team can wear their respective dyed leather, but not the opposing. So if a blue tried to put on a red leather helmet, it'd either not work or get taken off them. How do I do that?
Continue to help post