racism has no place in Islam, Muslims do a lot of fukked up shid but Muslims and Islam are two different things
Prophet Muhammad (pbuh) came into a world where slavery existed where it was part and parcel of the economies and nations across the globe. The leaders of Islam knew that an immediate declaration of abolition could not end slavery, but would only create confusion and severe dislocation in that epoch. Instead, Islam instituted a program where slaves could be assimilated into free society. Thus, slavery was gradually phased out from the Islamic society.
It was made obligatory that all slaves be educated. Muslims were enjoined to feed and clothe slaves in the same manner as themselves. It was decreed that if a slave wanted to purchase his or her freedom, he or she should be helped with money and the means to maintain an independent life. Harsh treatment of a slave was declared sufficient ground for his or her emancipation.
Moreover, the atonement of certain sins was declared the freeing of slaves, and freeing a slave was declared to be a virtue of the highest order equal in value perhaps to prayer and fasting.
The Noble Quran commands (what means) : "Marry those among you who are single or the virtuous ones among your slaves, male or female. If they are in poverty, Allaah will give them means out of His grace: for Allaah encompasses all and He knows all things … And if any of your slaves ask for a deed in writing (to enable them to earn their freedom for a certain sum) give them such a deed if you know any good in them. Yea give them something yourselves out of the means which Allaah has given to you. But force not your maids into prostitution when they desire chastity in order that you may make a gain in the goods of this life. But if anyone compels them yet after such compulsion is Allaah Oft-Forgiving, Most Merciful (to them)." [Quran 24:32-33]
In the legal sense of the word, the law of slavery is now obsolete. During the time it carried meaning, Islam made the slave's lot as easy as possible. Abdullah Yousuf Ali's commentary on the following verses runs as follows: “A slave, male or female could ask for conditional freedom by a written deed fixing the amount required for emancipation, and allowing the slave meanwhile to earn money by lawful means and perhaps marry and bring up a family. Such a deed was not to be refused if the request was genuine and the slave had character. Not only that, but the master is directed to help with money out of his own resources in order to enable the slave to earn his or her own liberty.
"Where slavery was legal, what is now called the 'white slave traffic', was carried on by wicked people like 'Abdullaah bin Ubayy, the hypocrite leader at Al-Madeenah. This is absolutely condemned. While modern nations have abolished slavery, ‘white slave traffic’ is still a big problem. It is absolutely condemned in Islam. No more despicable trade can be imagined. The poor unfortunate girls that are victims of such a nefarious trade will yet find mercy from Allaah, whose bounties extend to the lowest of His creatures.
"Under the unique program of assimilation, slaves in the Islamic era were able to acquire all the rights of free citizens, and attained the highest levels of social, political and economic achievement. The Prophet Muhammad actually warned his followers to: "Listen and obey even if a black slave becomes your leader, so long as he should enforce amongst you the Law of Creator."
Thus we read about Bilaal Al Habashi a former slave from Ethiopia who became the closest aide of the Prophet and one of Islam's most prominent personalities. Bilaal also possessed a marvelous, melodious voice and was chosen to call the believers to Prayer in the lifetime of the Prophet .
Then there was Zayd bin Haarithah the slave whom the Prophet adopted, showering upon him a father’s love and affection, so that he grew up to become one of Islam's greatest generals.
In Islamic history, we find entire dynasties of people who were once slaves, but then attained power and achieved victories for the entire Muslim nation.
We read about Kaafoor, a slave from the Sudan who rose to be ruler of Egypt and Syria whose name has since become proverbial for wise leadership in Islam.
We read about Malik Ambar, another African slave, who became a brilliant ruler and was one of the Nawaabs (Muslim princes) of India.
Islam opened the doors of social, political and economic equality to slaves – as a result, erstwhile slaves rose to be Sultans, and slave-women became favorites of the ruler and mothers of heirs to the throne. At times, a slave himself became a master and held freeborn men of wealth and power in dread of him.
From these few examples we can see that neither one's ancestry, nor the color of one's skin, nor the place of one's birth, were allowed to stand in the way of anyone achieving any position or making any contribution in the Muslim world. Therefore, to say that Islam practiced slavery would be to totally misunderstand (or misrepresent) the dynamics of history and the nature and record of Islam.