The title maybe isn’t so clear, let me elaborate.
The theory of European racial supremacy no doubt fuelled many instances of colonialism amongst less developed societies, but how did these same people reconcile their beliefs with great non-European historical civilisations and achievements?
Examples such as:
And all the countless more before their time.
How did they understand these societies in relation to their beliefs?
https://www.reddit.com/r/AskHistorians/comments/1s62iy/europe_had_normal_diplomatic_relations_with/
This answer by /u/victoryfanfare directly answers how they dealt with this contradiction at least with africans in the last paragraph of his answer but the whole thing is great and will help you understand as its about how the modern conceptions of race were created