Well, one example that comes to my mind of something like this were the Nuremberg laws in Nazi Germany that required Jews to wear a yellow star of David on their clothing.