Scholars have been aware for a long time of the curious paradox of Enlightenment thought, that the supposedly universal aspiration to liberty, equality and fraternity in fact only operated within a very circumscribed universe. Equality was only ever conceived as equality among people presumed in advance to be equal, and if some person or group fell by definition outside of the circle of equality, then it was no failure to live up to this political ideal to treat them as unequal.
It would take explicitly counter-Enlightenment thinkers in the 18th century, such as Johann Gottfried Herder, to formulate anti-racist views of human diversity. In response to Kant and other contemporaries who were positively obsessed with finding a scientific explanation for the causes of black skin, Herder pointed out that there is nothing inherently more in need of explanation here than in the case of white skin: it is an analytic mistake to presume that whiteness amounts to the default setting, so to speak, of the human species.
But you do have examples of Enlightenment thinkers in the 18th century who formulate anti-racist views of human diversity. One in particular I occasionally talk about here, namely, James Beattie, and I've briefly discussed Beattie's argument, against Hume, for human equality and "the sacred rights of mankind". In Beattie's view the only reason anyone would deny human equality would be to justify things like slavery, which he regards as a crime against man and God. It might be worthwhile quoting his appeal to his fellow Britons on the point:
It is easy to see, with what views some modern authors throw out these hints to prove the natural inferiority of negroes. But let every friend to humanity pray, that they may be disappointed. Britons are famous for generosity; a virtue in which it is easy for them to excel both the Romans and the Greeks. Let it never be said, that slavery is countenanced by the bravest and most generous people on earth; by a people who are animated with that heroic passion, the love of liberty, beyond all nations ancient or modern; and the fame of whose toilsome, but unwearied perseverance, in vindicating, at the expense of life and fortune, the sacred rights of mankind, will strike terror into the hearts of sycophants and tyrants, and excite the admiration and gratitude of all good men, to the latest posterity.
Thus one can indeed find Enlightenment thinkers who are insistent on the equality of all human beings, regardless of their race. But, of course, this gets into the fact that not all Enlightenment thinkers are the same; they are quite a diverse bunch.