You may have seen this: a black woman in New York successfully sued her employer because her supervisor repeatedly called her a "nigger" when berating her. What makes the case interesting is that her supervisor is also black. His defense was that the word "nigger" is used among blacks as a term of endearment. The jury did not decide whether that was ever true, but did decide that in the recording she had made of one such conversation there was nothing endearing about it. She was awarded an amount in six figures.
Yet what he said was certainly true. Blacks do use the word affectionately between each other. They may take offense when others use it, but it is often an expression of friendship among themselves. It certainly seems that it was not about what the manager said, but how he said it. In a separate incident, it is reported (without details) that a supervisor in a state office referred to a particular chocolate candy as "nigger babies", and also used the word with reference to the current President of the United States, and the state agreed that it was perfectly legal for him to do so. Just as it is perfectly legitimate for a preacher to say that you're "going to hell", or the American Kennel Club to call half of its contestants "bitches", it is only the use of these words in an individually insulting context that is legally objectionable.
On the other hand, it is not at all clear that she would have won had he called her something else. Your boss can call you names; he can probably call you vulgar names. If he calls you an idiot, or a smeghead, or a son of Mordor, you have no recourse. It is because this is a racial epithet that it matters, because it is a denigration of her as a member of a protected class. She won because a manager used a word that is a derogation of those of African extraction and she is an African American. She would probably have won had he used a word derogatory of women. She probably would not have won had it been a derogation of some other sort--had he used words that are derogatory of Jews, or Italians, or Poles, none of which apply to her. Your boss can insult you; he just can't do so by attacking you for being a member of a protected class.
That also means that if you happen to be a straight male caucasion Protestant, you can be called anything, no matter how offensive, with no recourse. You are not a member of a protected class. There are plenty of derogatory terms for European ancestry of various sorts, but somehow most of us have gotten past the petty quarrels that once (and perhaps in some places still) separated English from Irish and Scottish, Swedish from Norwegian, Czech from Slav, and which made Italian and Polish immigrants the butt of hundreds of offensive jokes once they replaced the Irish in the lowest tiers of society. We want the world to be a better place in which minorities are treated with respect; to achieve it, we will prosecute anyone who offends the current minorities, but allow insults that do not attack those particular minorities.
The word "nigger" is particularly interesting, because it was not always offensive. Blacks were called "negroes" for centuries, and in some dialects it was slurred to the shortened form. Some, mostly in the American South, would sneer it derogatorily, and so it became offensive, and by the fifties the accepted term (used in the name of the N-Double-A-C-P) became "colored". That was also sneered, and "black" replaced it by the sixties, and before the sixties were completed it became "African American"--too big a mouthful to sneer effectively, but seriously, it was never what was said but how. I am not interested in doing so, but I must ask, are we permitted to hate other classes of people, and express our hatred through insult and invective, or not? If not, does it equally protect everyone, or are there special categories of people who are protected because someone, usually their ancestors and not themselves, was mistreated? Equal treatment under the law should mean that we are all equally protected. If someone calls a me "honky" or "gringo" or "WASP" or "fundy" or "W.O.P." in a derogatory way, am I also protected? Or does this kind of protection only extend to those whose ancestors were most recently so abused? Should we accept the dystopian future Bradbury envisioned, in which no one can speak for fear of offending someone else, or the principles propounded by Holmes, to protect all expression of personal opinion that is not directly inciting violence?