The kind of extremism found in Muslim nations tends to be of the Muslim vs. non-Muslim variety than any specific racial-based discrimination.
In Turkey, even secular discrimination tends to be of the Turk vs. non-Turk variety from what I observed. A darker-skinned Syrian Turkmen will still be more welcome than a pale-skinned Danish man who lived in Turkey for 20 years. This is distinct from America where the most patriotic American black man who identifies more as an American than whatever African nation his ancestors were from and who family was in America for 10 or more generations will be kept at a polite arm's length by Americans of white European stock.
This is likely because slavery and other unsavory practices in primarily European societies needed to be disguised with some philosophical hogwash justifying it to the average man in order to make them feel morally good about it. Hence the ideas of racial superiority explaining why it was totally a good thing. In non-European societies there was generally no need to do this, the general idea was "we kicked your ass and now you're a slave" with no whitewashing it and no need to put down other races to make oneself feel better. If you're gonna do some raiding, pillaging and slaving, might as well own it.
Just my two cents on the issue.
European writers when travelling the Ottoman Empire and the Muslim world actually got triggered at the sight of Turkish men marrying European Women.
Nomads like the Turks and Mongols had no problem with mixing in societies that they conquered.
Which led to many mixed people but to the European writers to them this triggered their racial arrogance.
A few confederate officers after the war migrated to the Ottoman empire and the sight of an African Pasha triggered them.
This is why the dna of the Turkic peoples and the Mongols are so far and wide because they appreicated in living in the places they conquered.
Turks basically said just pay your taxes and tribute and we will leave you alone.
But the Turks who settled in North Africa also formed their own elite societies.
What im interested is how the Turks interacted with the local Arabs and Amazighs of North Africa. This needs some good research its a fascinating period.
I feel like Ottoman North Africa is overlooked in Ottoman history.