Did You Know Wearing Red Used to Be Illegal?

Finally, you've got your time machine ready for your trip to the past! You head back to Renaissance Europe, ready to see the sights... but wait. Those guards look pretty mad over there... and they're pointing at your shirt.
Wearing red in the past was more than a faux pas. It was actually a crime.
What Are Sumptuary Laws?
Sumptuary laws aim to restrict or forbid personal purchases or displays of ostentation or luxury. Usually, this applies to personal dress, but it can also involve food and drink, transportation, houses, personal items, and more.
The history of sumptuary laws in the West goes back to Ancient Greece and Rome. As just one example, Spartans were forbidden from possessing gold or silver in any form; their currency was subsequently made of iron. In Rome, laws regulated how many guests were allowed at a banquet and what foods could be served.
In the early Medieval period, sumptuary laws had a Christian element, as the Church disapproved of the apparent class disparity between the aristocracy and the common people, with the focus on limiting the extravagance of the upper class.
Then came the Black Death.
Suddenly, 40-60% of Europe's population was dead, and the remaining workers had more bargaining power, meaning higher wages. High wages meant the common people could then afford luxurious clothes and food.
The aristocracy did not like that. Suddenly, sumptuary laws became focused on keeping the lower classes "in their place." Peasants were not allowed to purchase gold jewelry and fine linens, or wear colors like red and purple. In Scotland in 1433, a law forbade anyone below the rank of baron from eating baked meats or pies.
Did Anyone Ever Get in Trouble?
It's hard to be sure, but most historians agree that enforcement of sumptuary laws was inconsistent at best. Even though they were another component of class warfare, most sumptuary laws went largely unenforced. There weren't enough officials to monitor specific rules that were often subject to change.
That doesn't mean they were never enforced, though. In Renaissance Florence, state officials were allowed to rip forbidden garments off offenders' bodies. The city-state of Siena created a surveillance state where citizens could anonymously inform officials of violations.
In other cases, sumptuary laws created lasting cultural impacts outside the justice system: England's classic woolen flat cap gained popularity due to a brief law mandating woolen caps on Sundays in the 16th century. Even at the time, critics noted that sumptuary laws unfairly targeted the lower classes and were unjust.
What About Nowadays?
The idea that wearing red could be a crime would baffle most people. The Industrial Revolution and subsequent mass consumption culture made both enforcement and the will to create such laws unlikely. However, rules regulating how people dress are still found in modern settings through dress codes in workplaces and schools.
References: sumptuary law | Sumptuary laws | Sumptuary Laws | What are Sumptuary Laws?