Hello and welcome to JustAnswer.
I'm sorry to hear about your situation and hope I can help.
Unfortunately, as an at-will employee, you can be written up at any time for any reason (even a bad one) with or without prior notice.
This stems from the employment at-will doctrine, which is codified in California Labor Code Section 2922, which states:
"An employment, having no specified term, may be terminated at the will of either party on notice to the other. Employment for a specified term means an employment for a period greater than one month."
However, if your employer is discriminating against you due to your race, or if your work environment is hostile due to your race (which
definitely seems to be the case) you can file a complaint with the Department of Fair Employment and Housing for discrimination
and hostile work environment in violation of the Fair Employment and Housing Act.
You can file a complaint using the instructions available online here:http://dfeh.ca.gov/Complaints_eCompProc.ht