There's a difference. The code doesn't simply ban speech about
race, ethnicity, and so on. It bans speech that "stigmatizes
or victimizes" someone on that basis if and only if that
speech involves a threat to that person's academic efforts or
creates a hostile environment for their educational efforts.
I doubt very much that nasty comments about hair color would meet
those criteria.