So when designing characters an important part of them is flaws and how they overcome them or rise above them. And so I wanted to make a character(one of the main characters, either supporting the protagonist or the protagonist) that has the flaw of being racist and my question is if it is possible to make a sympathetic and likable character that has this flaw?
Racism is a common flaw, both real and imaginary.
In The Lord of the Rings there are plenty of "racist" comments, particularly between the elves and dwarves.
In the game Valkyria Chronicles there is a race that is highly prejudiced against throughout the story, even being part of the gameplay. This is explored in the story, with one character changing their ways and losing that prejudice.
In the book To Kill a Mockingbird the story is centered around racist culture and its effects.
From tiny slights and conversations, to a part of the story, to the whole story, there's nothing wrong with including racism in your story. The question is, how do you address it and what form does it take?
If you are simply adding racism to a character to add something "special" about them, then you have probably made a mistake, as is always the way with token traits or characters. If you are exploring your story's world or have something to say about racism and have a good way to get it across, then by all means add it to the story and explore that.
It is best that any trait added to your characters helps drive your story forward.
A racist character for the sake of diversity makes little sense. A racist character for sake of story and world exploration, can be done very well.
Depending on your setting, it might make sense for your character to be racist, it might even make more sense for them to be racist than not to be. For example, in medieval Europe, if someone wasn't a Jew, chances are he was an antisemite. (Look for example at "La Morte d'Arthur" or at "The Poem of the Cid".) Later on, you had the "Enlightened Europeans" and the "Primitive Natives". You can play this to create a moral dissonance between how the reader thinks and how the character thinks.
In a modern setting, there's no reason for a character not to be racist either. People holding racist views exist, so no reason not to write about them. You would need of course, to avoid presenting his racism as a good thing, glorifying it. Otherwise, your work would be perceived as racist.
Consider a flaw vs a handicap.
A flaw is the protagonist struggling against his own nature. The character arc is probably going to be about confronting a flaw, or he won't progress until he can learn to overcome it.
A handicap isn't going to change. It's just part of the character's nature, the background or the situation. It still limits the protagonist, but often in ways they don't realize, or can't do anything about.
A protagonist regrets their flaws, but lives with their handicaps.
In a racist society everyone is racist, but how active they are, how aware, how opportunistic are all still individual character traits. Racism is not a binary. You could potentially show every person in town being racist by degrees.
Your protagonist can be racist, in theory. But you know it's a problem so plot it against your timeline as it's own narrative arc, and take it seriously as a story element. If it's a flaw then his racism will need to be confronted a few times before the villain puts it into words. If it's worldbuilding do the research and add those disenfranchised voices to the story.
Is it possible to make a sympathetic and likable character that has this flaw?
Perhaps, it depends on the type of racism and how you balance it.
In modern culture overt racism and race-hatred is shunned, particularly by people (like editors and reviewers of popular fiction, or TV producers and studios) whose livelihood depends on the approval of thousands to millions of people.
It creates a knee-jerk reaction; like the comment of @NomadMaker above: Readers running into racist thoughts or derogatory words stop reading; or in some cases go to get their money back, to specifically NOT support the author that wrote it. Bookstores don't care, they will tear the cover off and get their money back. The same is usually true for me. Yes, it is intolerant, akin to my intolerance for men that punch their wives.
The point is, racism, bigotry and prejudice in your characters can have significant commercial impact on whether you GET published and whether you SELL what you published. In general, this is the information age, and the more lives ruined and people beaten or killed because of a bigotry, the less tolerant the information crowd becomes. (The lifelong consumers and users of online media, and the younger they are the more likely they are to be so.)
Thus you see a major cultural shift away from bigotry over heritable physical appearance, gender or homosexuality. A super-majority of modern readers feel that way, and like it or not, do not want to be exposed to it, and people that need to make money from your book know this and no matter how they personally feel will protect their bottom line. They have plenty of submissions to choose from.
It would literally lose them fewer sales if a villain is a serial killer and cannibal, like Hannibal Lecter, than an overt racist. As long as your serial killer and cannibal is an equal opportunity type of person. (Hannibal's first kill is specifically OF a racist; he is adopted by a Japanese mother, avenges his sister's death, etc.)
Over the top evil does not resonate with the day-to-day evil of racism that actually happens IRL constantly to people we know and love, and IRL is literally killing people we know are loved. For the same reason, it is very difficult to make a racist likable, I think almost nothing an author does can overcome the reaction of anti-racists, the portrayal of the racism in a friendly light (a good guy, the MC's sidekick) will drop such readers out of the world of imagination into the real world.
One way to get around that in fiction is to start out with the racist looking like a villain. Racism is evil, it can be accepted as part of villainy.
Types of Racism.
However, one must still be careful with the type of racism, which exists on a spectrum from mild (great-grandma's racism she only expresses privately) to physically violent and even "hunting" racism, to find and beat or kill or torture people. In-between is character assassination (promiscuity, criminality, laziness) racism, "I don't serve blacks", or "I don't hire Mexicans", or "Private school" racism or "don't let them vote" racism or cops "rough 'em up on arrest" racism, cop and vigilante "teach them their place" racism for perceived transgressions.
All of these are negatives, some are life destroying and unforgivable, even in a villain they may be enough to cause a reader to send the book back.
The other issue, is balance. If you want your villainous racist to be tolerated by the reader, they need some very large positive trait to counter their racism. For example, the character may think it true that blacks are mentally inferior and lazy, but the character values justice and truth above that, and if they find out a white guy is the criminal instead of the black guy, will go full bore after the white guy: i.e. the character may be a shallow thinker taught that racial differences are glaringly obvious, but that doesn't make those he regards as "inferior" automatically worthy of punishment: Racism does not trump their sense of justice or morality.
There are types of racism a character, without surrendering their racism, can still rise above.
By analogy, I believe people vary in their intelligence. Not by race or gender, but by chance, I think some people get lucky and are born with high functioning brains into environments that let them develop that high intelligence: Environments with good nutrition, sanitation, shelter, safety, discipline, absence of abuse, good education and resources (none of which an infant chooses, thus it is their good luck). But I can believe this without letting it infect my sense of justice and fairness. I could be a cop that believes most criminals are truly stupid, but being truly stupid does not make someone a criminal.
To answer your specific question,
NO, I don't think there is a way to make a MC supporting character a likable racist, if they begin a supporting character. It will make the protagonist and anybody else accepting the racist people that tolerate racism, and thus racists. Down goes the book. If the supporting character initially looks like an antagonist or on the side of the main villain, and the supporting character is not a physically violent racist and does not advocate for that, then they might become a supporting character by balancing their racism with some overwhelming positive trait that gives the MC (and audience) a reason to accept the help of this flawed supporting character. I might have sympathy for such a character, but I don't think I would like them. It would take something extraordinarily positive, like the racist being killed in the line of fire protecting a member of the race he despised, because his sense of justice overwhelmed his racism.
Yes, it is possible to create a sympathetic character who is racist.
A sympathetic character is not one who has no flaws, or one whose morals the readers agree with 100%. As readers we can sympathise with characters who hold to different sets of values than we do.
Granted, racism is a rather difficult example of this for a writer, because for (hopefully) the majority of your readers it will be on the extreme end of the scale of unacceptability. However, to make the character sympathetic, you can give them reasons for their racism. Some have already been mentioned both by you, and in other answers:
- The character has been brought up in a society that treats racism as standard. They have not yet had the opportunity or reason to revise these views. (Imagine, a sympathetic ancient Roman who has nothing against slavery, because, well, that's the way their world works)
- The character has been hurt in the past by a reprentative of the group they are prejudiced against ("A gang of people from X attacked my family home when I was a child, therefore, all people from X are evil")
- The character associates race/nationality with other aspects such as political/religious views, etc., that they find unacceptable ("Communism is evil, and Russians were communists, therefore, all Russians are evil").
Note: I hope it is obvious that I am not condoning or justifying racism in any form here. However, as empathetic creatures we can try to imagine that through different sets of circumstances someone may hold racist views without being an irreparably disgusting person. This is expecially true if you intend to treat this as a flaw that the character will overcome in the course of the story.
One more trick is to make the character intellectually aware of the fact that racism is illogical/evil, but make them unable to overcome their prejudice emotionally. As in "I know not all people from X are evil, but because of what they did to my family during the war I just can't look at them without disgust, however hard I try".
As a certain character from Zootopia would put it:
"Fear always works."
I soon explain it, but first, as per the universal guideline we found here:
Because, unlike, Hitler, we can understand why he does what he is doing. If we were put into his shoes, we might be doing the same.
To fine-tune this to racism:
- In racism, everyone is on the receiving end, all those dead black people, killed police officers, brutally lynched teachers were all murdered by racists. It's a circlejerk of violence that is nigh impossible to break out from.
- Racism doesn't always involve cold-blooded murders, shootouts, Charles Manson, etc. It can be as much as passive fear, nothing malicious, and generally we can forgive that more easily.
I know this answer doesn't add too much new, but the important stuff has already been said.