He did not want his face in the papers. Or on the TV. As he walked out of Dundee Sheriff Court this week Carl O’Brien – like so many who get in to trouble with the law – pulled his jacket over his head.

The 25-year-old had already pled guilty to racially abusing Humza Yousaf, the first minister, earlier this year.

Now he had just been told his sentence: an eight-month curfew under which he will not be allowed out between seven in the evening and the same hour of the morning.

This was the kind of smart disposal – an alternative to a short stint behind bars – that right-wing commentators call “the SNP’s soft-touch justice”.

O’Brien had also hurled abuse at other nationalist politicians. So had his accomplice Tracie Currie, 35, who, instead of jail, got an 18-hour supervision order and was told to do 180 hours of unpaid work.

Read more: Beware the rightists trying to recruit war dead

What possessed O’Brien and Currie to behave like this? Pass. But the abuse and harassment of MSPs, MPs and councillors is not exactly rare. Neither is the racism faced by Mr Yousaf or any other high-profile politician of colour.

Prejudice of one hue or another is, well, routine, mundane, everyday, just a part of the background music of our public life.

Sure, there will be times when opinion leaders stop and tut at some unpleasant incident. As they did over the latest court case.

But I think it is fair to ask this of political influencers: what are you damned well gonna do about it?

Because – let us not be coy here – our often dysfunctionally hyper-partisan political culture absolutely attracts, creates and enables all sorts of ghastly bigots, including racists.

This is not a new or a clever observation. Most of us know the mechanisms at work here. We can see it play out on social media. What happens? Well, partisans are extra vigilant about any kind of bigotry by anybody on or supporting the other team. And they ignore, forgive or downplay it on their own side.

We have a perfect case study of this right now: the language used – or at least tolerated – by online unionist radicals about Mr Yousaf and the war in Gaza.

Now there are yobbos on the internet and in real life who just up and call the FM a “papa bravo”, to use the police’s euphemistic phonetic alphabet. These guys are easy to spot. And punish.

But what about the bigots who do not fancy an ankle bracelet or a life-changing chat with HR?

Well, they try to avoid specific hate words. Instead, they insinuate, delivering their racism with what they imagine are subtle nudge-nudges and wink-winks. But that does not make their prejudice any less toxic.

Some haters have used the Hamas terror attack on Israel last month and the IDF’s subsequent counter-attack as cover to direct bile at Mr Yousaf.

And they have done so far less artfully than they imagine. A few problematic social media actors have started using Hamas in place of the FM’s first name. We see you, unfunny racists.

Bigots and pro-UK hyper-partisans have repeated false claims that the SNP leader supports or, bizarrely, even funds Gaza-based terrorists.

Others have – stupidly, irresponsibly – insisted that there is no difference between being a Muslim and an Islamist.

Now there are arguments against Mr Yousaf’s Middle East policy positions, of course there are. Some critics think the SNP leader’s ceasefire demands are irrelevant or naive.

I am not saying those people are right, or wrong: I am pointing out they have managed to articulate their stances without being chauvinist bams.

Read more: Why we all need to have a talk about quislings

There is an international context to hate. At the height of the Black Lives Matter protests Mr Yousaf made a Holyrood speech bemoaning the lack of BAME representation in our institutions. Bad faith actors misrepresented his words to suggest the FM thinks Scotland has “too many whites”.

Indeed, this misinformation has been endorsed by Elon Musk, the South African-born tech billionaire who bought Twitter and turned it in to a white supremacist hate-bin.

The global far right has Mr Yousaf, along with London Mayor Sadiq Khan and other high-profile Western Muslims, in their sights.

This presents a test of character for influencers in the unionist social media eco-system, a test too many are failing as they amplify deranged right-wing attacks on the SNP leader.

Take last week. A writer and journalist called Douglas Murray, speaking on a US TV show that indulges the alt-right, called Mr Yousaf the “first minister of Gaza, or ambassador for Gaza”. Then he added: “People like Humza Yousaf have – I say it carefully – infiltrated our system.”

It is chilling to hear an ethnic minority politician described in this way. The Eton-and-Oxford-educated Mr Murray is better mannered than thugs who use the P-word. But he is not classier.

Mr Murray has form for incendiary language. The British Council of Muslims, citing his calls to “pull down” mosques, describe the half-Scottish polemicist as “objectively racist and Islamophobic”.

His claims Mr Yousaf had “infiltrated” politics sparked widespread concern across Scottish life. Good. It also – and this is where we should worry – provoked all sorts of racist tropes from less moderate pro-UK online activists, such as claims the Glasgow-born politician has loyalties elsewhere.

Who was packaging Mr Murray’s nonsense for a Scottish audience? It was a British nationalist account on X, as Mr Musk rebranded Twitter after unleashing the platform’s bigots.

There are – sorry to be blunt – a few unionists who hate the SNP more than they hate racism, who fear the break-up of Britain more than the rise of the far right.

So they end up tolerating or amplifying hate. There is only one way to stop this: the perpetrators need to be challenged by voices from their own side. And that, as yet, just does not happen enough. We all need to act.

Those who peddle racism on social media should be made so ashamed that they have to pull their digital jacket over their virtual heads.