One comedian’s liberation is another comedian’s imprisonment.

We saw that last weekend when comedian and television host Larry Wilmore called President Barack Obama the n-word at the annual White House Correspondents Dinner, and, thus, on national television.

Some cheered the poetic license of Wilmore; others cringed. Some will hail the gentleman made famous by Jon Stewart on Comedy Central as a comedic genius; others will call him a comedic fool. Or tool.

Still, Wilmore obviously felt liberated enough to refer to President Obama in such a traditionally vile manner. “Vile,” that is, before the race-baiting rap culture hijacked what should be cool in popular culture among black folk these days.

The rappers have taught young black males to incessantly refer to one another as n-words. If you don’t, then you are considered totally uncool. And we all know how young folk yearn to be cool. For many young black males, the n-word is classified as a term of endearment.

But to use that polarizing term in reference to the president. On national television. Before an audience of nearly 3,000 onlookers, who are mostly white and media stalwarts with the power of the pen and the microphone.

Come on.

Larry Wilmore, host of the ratings-challenged “Nightly Show,’’ should have known better. Comedian or not, it doesn’t matter.

Many black observers praised and defended Wilmore, rationalizing that his racial epithets were just part of his schtick. Some said, “He wouldn’t be the authentic Larry Wilmore if he didn’t use the term.”

That’s most interesting considering a white female journalist referred to President Obama simply as “Obama” several months ago during a news conference with press secretary Josh Earnest at the White House Briefing Room. That situation created a mini-firestorm, because the usual protocol is to refer to him as “the president” or “President Obama.”

Oh, how can she disrespect President Obama in that fashion? Disrespect the office of the presidency like that? How could she, some asked. The nerve of her …

Bottom line: We, meaning liberals and Democrats, change the rules of the race game in midstream when it suits our own whims.

On Monday afternoon, Josh Earnest intimated that Obama wasn’t bothered by Wilmore’s racial slurs, relating that the president told him that morning that “he appreciated the spirit of the sentiments that Mr. Wilmore expressed.”

However, something tells me President Obama, clearly in an intractable situation, relayed that message because (A) he had no warning that Wilmore would use racial slurs toward him and (B) he didn’t want to further exacerbate the conversation and controversy. Meaning, he probably was caught off-guard, so just let this verbal slight go and it will soon dissipate.

Wilmore, ostensibly, was granted “liberation status” by his supporters because he’s a black guy addressing another black guy. Never mind the other black guy (the recipient) merely totes two key monikers wherever he goes: President of the United States and Leader of the Free World.

Yes, some Larry Wilmore Defenders instinctively and reflexively will say the forum was a comedic gala. Understand the proper context, they will say. OK, in the interest of comedic context, suppose former Speaker of the House John Boehner would have referred to President Obama as an n-word during that hilarious video skit that aired during the White House Correspondents Dinner. Especially during the scene when Boehner and Obama sat in the theater at the White House.

Can you imagine Boehner’s successor, Paul Ryan, uttering the n-word, even as a speaker at the annual spring dinner that is defined as the intersection of working media and fickle Hollywood. Ryan would be forced to resign, no doubt. For Democrats, that utterance is called freedom of expression. For Republicans, that so-called “freedom” would be labeled racism. Or insensitivity. Or micro-aggression.

Climb into Wilmore’s wheelhouse for a second. Suppose a fellow white comedian, such as Jerry Seinfeld or a Jimmy Fallon, would have referred to President Obama as the n-word at the correspondents dinner. Whoa. Seinfeld’s popular “show about nothing” probably would lose its profitable syndication distribution status as reruns on various cable networks. Yada, yada, yada. And Fallon likely would be fired by NBC by midnight. Adios.

We would hear plaintive wails by black leaders for a boycott of the White House Correspondents Dinner. The Washington Hilton Hotel, the event’s venue, might be torched before dawn on Sunday.

Here is a key point of reference: I remember in 1980 when Richard Pryor appeared on the cover of Ebony magazine, the subject of an exclusive interview. Pryor was the funniest cat in the world during that era. He, like Wilmore, had an intrinsic propensity to use the n-word as part of his comedic routine. Running off his mouth like the Mississippi River.

Until … Pryor went to Africa.

Here is what Pryor learned during his visit and what triggered a startling metamorphosis:

EBONY: Some black people were also upset about how often and how publicly you used the word “nigger.”

PRYOR: That’s over now, too.

EBONY: You’ll never use the word again? Why.

PRYOR: Well, I took a trip to Africa — which, by the way, is where I plan to live some day. I went to Kenya, and while I was there something inside of me said, “Look around you, Richard. What do you see?” I saw people. African people. I saw people from other countries, too, and they were all kinds of colors, but I didn’t see any “niggers.” I didn’t see any there because there are no “niggers” in Africa. Can you imagine going out into the bush and walking up to a Maasai and saying, “Hey, nigger, come here!”? You couldn’t do that because Maasai are not “niggers.” There are no “niggers” in Africa, and there are no “niggers” here in America either. We black people are not “niggers,” and I will forever refuse to be one. I’m free of that; it’s out of my head. …

Richard Pryor felt “free” enough to change his vocabulary.

From one comedian to another, perhaps Larry Wilmore also can set himself free.