This question was closed as off-topic (now deleted). A general reason ("not about interpersonal skills as defined in the help center") was given, but none of the indicators for off-topicness in the help center apply.
Knowing whether it is ok to use expressions in a joking or friendly context that are usually considered racist and offensive seems to be a very important social skill. (And I'd answer "no" in most cases.) So I'm struggling to understand why the question was closed as off-topic.
Notice that I have no qualms about this particular question being closed. OP explicitly used an obvious racial slur in the title. After it was edited out, for which an explanation was given, OP reverted to the original version without comment. To me this suggests the author didn't ask in good faith and wanted to troll, meaning the question as it was phrased should have been closed as "rude or abusive".