Roseanne Barr tried hard to apologize for tweeting some really vile stuff, but alas, it just wasn’t good enough.

For those who missed it, during a discussion on Twitter about former Obama aid Valerie Jarrett, Barr tweeted, “muslim brotherhood & planet of the apes had a baby=vj.”

At first she reacted to criticism that the tweet was racist by saying it was a joke, tweeting “ISLAM is not a RACE, lefties.”

Later, she thought better of it and apologized – profusely – but it was too late.

Reaction was swift. Words like abhorrent, repugnant, vile, disgusting, distasteful, objectionable and revolting were used on social media to describe Barr’s comments.

ABC was bombarded with demands to cancel her hit show.

The network responded rapidly, canceling the show even though the nine-episode reboot of “Roseanne” drew massive ratings. According to The Hollywood Reporter, the opening episode drew more than 18 million viewers, the largest audience for a sitcom in more than three years, and the show averaged more than 10 million viewers per episode. It was the season’s top scripted show on TV – not just ABC, mind you, all of television.

So it was kind of a big deal when ABC actually put ethics ahead of profits and canceled the show.

“Roseanne’s Twitter statement is abhorrent, repugnant and inconsistent with our values, and we have decided to cancel her show,” said Channing Dungey, president of ABC Entertainment.

I think that’s about right. I applaud ABC for that.

This is not a free speech issue. Lots of people confuse things like this with freedom of speech. Your freedom of speech can only be infringed by the government.

If your employer fires you for saying something stupid, it has nothing to do with free speech.

You are free to say whatever you want, short of yelling “Fire!” in a crowded theater. But your employer or your social media followers are free to dispatch whatever justice they feel is necessary.

Freedom of speech does not mean you can’t suffer any consequences from the things you say. It just means the government can’t tell you what you can and can’t say.

So ABC’s reaction was appropriate, and, I believe, warranted.

I just wonder why it took them so long. I mean, it’s not as if ABC had no idea Barr was a loose cannon. After all, it was in 2009 she donned a Hitler mustache and swastika armbands to pull a tray of burned gingerbread “Jew Cookies” out of an oven.

The shoot was for the satirical Jewish publication, “Heeb.” But, satire or not, the imagery drew sharp criticism.

There are lots of other examples of Barr’s edgy tomfoolery, but ABC gave her a show anyway. Then this tweet put them over the edge.

Fair enough.

I guess if you’re ABC, you just really don’t want to hitch your wagon to that type of unwholesome controversy – or do you?

Keith Olbermann was recently hired by ESPN for the sixth time. That’s right, you read that right, the sixth time.

Just this month he inked a new deal. For the record, ESPN and ABC are owned by Disney. You know, the happy, family-oriented Disney.

So let’s look at some of Olbermann’s tweets, all directed at President Donald Trump:

• You are the leaker, you stupid, pea brained, mother******* traitor. RESIGN.

• The hurricane is going to do less damage to schools than you are, mother******.

• To hell with you, you mother******* traitor.

• What needs to be replaced is THIS mother******. Today. This morning. NOW.

• Go f*** yourself.

• ICYMI: So we’re clear, this is where this f******, lying anti-Democracy F*** lied to the American people with no F****** quote f****** marks.

And here’s one directed at the president’s daughter, Ivanka:

• Then tell your racist, whitesupremacist, neo-nazi father to get the f*** out of our country.

Classy, eh?

So here’s the thing.

While I completely defend and support ABC’s decision to bag Barr’s show, I can’t help but wonder why ESPN would keep re-upping contracts for a guy like Olbermann.

Aren’t his Twitter rants at least as foul as Barr’s? Must be the ratings. But wait, Barr had great ratings. So why take the high road with Barr and the low road with Olbermann?

Here’s the thing. Barr’s antics never got her in trouble before. At least not until – uh oh – she outed herself as a Trump supporter.

I’m pretty sure if Olbermann would have unleashed the same profanity laced tirades on President Barack Obama, he would have become unemployed.

And I’m pretty sure if Barr would have said that Trump was the product of his mother having sex with an orangutan, she’d still have her show. (Oh, wait, that was Bill Maher who said that. He kept his show.)

Truth is, there are plenty of examples of other talking heads who tweet vile stuff about Trump or say vile stuff about Trump on the air and never get in trouble.

Remember when Stephen Colbert said the only thing Trump’s mouth is good for “is being Vladimir Putin’s c*** holster?

Why, just this week Samantha Bee called Ivanka Trump a feckless c***. They’re all still working.

It’s a glaring double standard.

As long as you’re a liberal bashing Trump – or conservatives generally – you can probably get away with saying all manner of nasty things.

But if you’re a Trump supporter or a conservative and take a few swings at a liberal, look out.

Wait, you say. It’s not about politics. Barr’s tweet was racist. That’s the difference. That other stuff isn’t racist.

But oops, remember when Bill Maher used the phrase “house n*****” on the air? He didn’t get in trouble.

That thinking completely eludes me, anyway.

You’re arguing that dropping all the F-bombs you want in the most insulting manner possible is OK? It’s OK to accuse someone’s mother of bestiality? It’s OK to engage in the most extreme vulgar, homophobic name calling imaginable? This is all good fun as long as it’s not racist?

Really?

Here’s an idea.

Why not punish all vile or vulgar talking heads equally, regardless of which side of the aisle they’re on?

Fire them all. Every last one of them.

That might actually lead to an increase in civil discourse and a narrowing of the political divide in this country.