While many racists, nazis, facists, and eugenisists claimed influence from Darwin via the concept of "social darwinism", I know he himswlf never contributed to social darwinism. So I was wondering what where Darwin actual views of race, racism and slavery?
This is a tremendously rich question given the complex implications of Darwinism, Darwin's own fluctuating views on race, and the various ideological utilizations of Darwin's theories.
To start with a pretty clear answer: Darwin unequivocally was opposed to slavery. The historians Adrian Desmond and James Moore, while not without their problems, have written extensively on Darwin's life and work. In Darwin's Sacred Cause, they actually place opposition to slavery as central to his worldview, and one of the guiding beliefs that led to Origin. This is quite a strong claim indeed, but not one without evidence ranging from personal letters to marginalia. Whether or not you accept this argument, Darwin was opposed to slavery:
"I was told before leaving England, that after living in Slave countries: all my opinions would be altered; the only alteration I am aware of is forming a much higher estimate of the Negros character" 1833
Darwin maintained his opposition to slavery and support of abolition throughout his life.
Origin has an extended discussion of 'slave-ants' where Darwin writes of the instinct to create slavery as it relates to evolution, but otherwise it is not explicitly drawn out. Descent of Man has much greater discussions on race, racism, and slavery; while slavery is explicitly stated to be a "great sin...[that is] almost universal, and slaves have often been treated in an infamous manner," Darwin establishes a hierarchy of 'civilization' and 'barbarity'.
Descent presents clearly racist claims on indigenous Americans and Africans. Many scholars dismiss this as merely Darwin being a product of his time; in fact, his writings are remarkably removed from most late-19th century texts on race and variation. Darwin saw distinct differences in race and culture, but unlike many contemporaries saw the potential improvement of 'barbarians' alongside the potential degeneration of 'civilized peoples'.
Chapter VII of Descent is dedicated entirely to this discussion of race:
"Their mental characteristics are likewise very distinct; chiefly as it would appear in their emotional, but partly in their intellectual, faculties. Every one who has had the opportunity of comparison, must have been struck with the contrast between the taciturn, even morose, aborigines of S. America and the lighthearted, talkative negroes..."
At the same time, one of the implications of Darwinism is that all modern humans are derived from a common ancestor (such is the focus of Huxley's discussion here).
"When the races of man diverged at an extremely remote epoch from their common progenitor, they will have differed but little from each other, and been few in number; consequently they will then, as far as their distinguishing characters are concerned, have had less claim to rank as distinct species, than the existing so-called races..."
The scholar Janet Browne here sees "social views regrettably typical of a nineteenth-century British gentleman," and that the clear hierarchy of Darwin expressed here informed and supported later social Darwinism. Darwin opposes the classification of races, in particular derived from skin tone (he discusses, for example, acclimatization as it relates to skin color--why do the Dutch of South Africa lack darker skin after having been there for generations?), but believes that there are meaningful racial differences. He discusses, too, indigenous Americans raised in 'civilized' society, coming to radically different conclusions than his contemporaries that would have seen racial aptitude as immutable.
There is much, much more to say, but as a brief sketch Darwin was opposed to slavery, and would be opposed to much of 'Social Darwinism'. Nonetheless, he did embrace and reflect many racist views due to his social milieu and scientific worldview.