Well.
Capitalism is an economic system. It's based on two simple ideas: Private property, and the property owner's right to profit from the use of their property. In principle, the property owner is incentivized to maximize profit from their property, without regard for the race, class, gender, etc. of the other parties involved in the transaciton. If it pay, it plays.
But in practice, this doesn't always happen. The big issue is that people will trade profits for happiness. This is the whole point of profits, really. So if I don't like you for some stupid reason, I might choose not to do business with you. I'd give up some of my profits for the happiness of not having to deal with you.
So capitalism as such isn't really going to have an effect on racism, or any other ism.
Communism, on the other hand, is also an economic system. It's also based on two simple ideas: Communal property, and communal profit from the use of the property. In principle, an equitable community, that accepted community members without regard for race, etc., would share communal profits equally to all members.
But is this what actually happens? I guess one approach to this question would be to look at kibbutzes and other small-scale, opt-in communes. Do such communes tend (not) to show a racial bias when accepting new members? Do they form around groups that are already ethnically bonded, and therefore reluctant to embrace other ethnicities in their commune? After they're formed, do the minority members tend (not) to get treated equally in commune affairs?
Another approach might be to look at the large-scale attempts to implement communism. This becomes a question of political systems, not just economic systems. There's also the problem that large-scale attempts like the Soviet Union are not actually communism, according to some.
My understanding of the Soviet attempt is that the answer is mixed: On the one hand, the totalitarian regime was in a position to mandate and enforce equitable treatment in the commune, to a much greater degree than liberal democracies do. On the other hand, the totalitarian state was in a position to conduct massive ethnic cleansing operations. But does this actually tell us anything about communism? Maybe not.