Say the Plantagenet kings of England in the medieval times are really tired of bloodshed and come up with a plan... pass down the mask law: every men and women must put on a plain mask, which must cover at least 2/3 of the head on all outdoor occasions. Blue for male, pink for female and green for undefined. Failing to do so is the same as being found guilty of treason and the culprit must face capital punishment, regardless of age and social status, including the royalties. The only hint of one's status comes from their appearance and outfit and of course their exposed skin. It is nearly impossible to eliminate killing, but would the rules of the house of Plantagenet at least prevent any large scale conflict?
First, in medieval times there hardly was a concept of "undefined". It was simple. Male. Female. That's all. No green masks.
Wars were long-distance affairs. If you want to have a holy crusade, it's not because in your cities people didn't wear masks. It's because the Holy Land is kept by infidels and your faith tells you to go to war. Or it's because Holy Land is supposedly rich, and you want some of it for yourself.
In medieval times, people didn't travel much. You had traveling merchants - no one tried to discriminate against them. They wanted to be seen. Of course, some might want to rob them, but overall they were a welcomed addition. Sometimes you had big waves of migration, but a mask wouldn't change the basic problems of lack of food and land.
On the other hand, in a town everyone knew who everyone else was. London was about 5000 people then, for example. A mask wouldn't change a thing, you would know who was who anyway - especially given the fact that social status greatly limited who you really cared about. Oh, and people didn't have so many clothes we do now. And each piece of clothing was different. "Oh, it's a Scottish coat, I wonder if it's old McKinley wearing it" - except that if there was only one Scotch merchant in town, no one would wonder. They would know.
You have more basic problem. You look at medieval times, but you don't see it. You see the modern world with different decorations. It's not. Philosophy was different. Mindsets were different. Social problems were different. You're trying to solve a problem that was mostly nonexistent. Unless you learn more about the period, your story will have many more inconsistencies and things that just don't make sense.
During this period warfare was more or less endemic in England but it was nothing to do with race or culture. Rather it was the result of political struggles for wealth and influence based on a complex network of alliances and family loyalty.
Consider the fact that the Wars of the Roses one of the most protracted and destructive conflicts in this period was between two branches of the Plantagenet family There is an irony here that the symbols of the red and white rose were used to identify an individuals loyalty to one faction or another.
While there were certainly plenty of international wars between nations and proto-nations these were again really turf wars between dynasties for territory and political capitol rather than as a result of racial or cultural animosity. At this point in Europe the concept of sovereign nations was not well established and practical loyalties were based around local Lords and noble houses rather than nations as such.
You also have to bear in mind that most people would have know everyone else around them reasonably well, there were no huge metropolitan areas and the majority of the population lived in fairly small communities. So any stranger would have been noticeable and very possibly treated with some suspicion.
Also people would have been very used to identifying people by their clothing, manner and general appearance. Society in this period was very sensitive to rank and class and many of the various trades and professions had their own distinctive costumes, as well as a complex system of heraldry to denote factional loyalties. In fact the face was pretty much the only aspect of appearance which didn't identify a person's status.
To put it another way much of the fundamental functioning of medieval society was based on people having very well defined roles which defined the whole way that they lived their lives the distinction between a peasant, a craftsman, a merchant and a knight were so definitive that there is no trivial way to disguise them.
No, discrimination was the way of life back then.
Guilds, for example, were very keen of keeping their privileges. They can only enforce their privileges when their members can obviously been identified as those. Guilds would not admit Jews. They would check heritage, not your face.
Issuing a law to eliminate such discrimination would surely result in a prompt death.