Your company has a dress code, but you don't agree with it. You decide not to adhere to it, get a warning and then eventually get fired when you continue breaking it. Is this legal?
It is, in many cases, but the specifics are important. The Equal Employment Opportunity Commission (EEOC) does note that companies are allowed to use and enforce dress codes. As with other workplace rules, violations can lead to termination.
However, those who are in protected classes may be allowed to violate the dress code. For instance, someone with a disability may not be able to adhere to it through no fault of his or her own, and firing that person may then be disability discrimination. The same can be true in cases regarding religious apparel.
With culture clothes, some of it depends on whether or not it appears that the employer is only targeting people based on their culture.
For example, perhaps some employees are from Africa and wear traditional, casual clothing. If the dress code says that casual clothing is permitted but says that the traditional clothing is not, that could be a violation. If the dress code says that casual clothing is not permitted for any workers -- regardless of origin -- then it may be legal since all employees are still being treated fairly and subjected to the same rules.
Being fired can be extremely frustrating, especially when you think your employer is targeting you specifically, perhaps trying to bend the rules to hide discrimination. If this happens, it's critical for you to know all of the rights you have as a worker in California.
Source: EEOC, "Prohibited Employment Policies/Practices," accessed May 16, 2017