I dont believe there is a code against racism. If you commit an act against someone, that would be actionable. I could hate, or be biased as could be, but if I comport myself in a manner not violating someone elses rights, I should okay. Thought is not crime.
Apologies if Im not exactly getting your point.
When your thinking does not match that desired by your betters and becomes known, it becomes crime.
Hate is a Motive, it isn’t a Crime.
Hate Crime Laws are 100% Unconstitutional, period.