Morally Ambivalent Characters
So, I was wondering people's thoughts on this subject.
What I mean by "Morally Ambivalent" is like... characters that, while they may present a relatively clear "right side" in the story (though they might not), act in ways that, due to internal conflict, "unconventional" views on morality (by the standards of their own society/the society of the readers and the writer, or simply according to generally accepted wisdom), overwhelming emotions, simple selfishness, or other confounding factors behave at times in ways that the reader is unlikely to find justifiable (and they themselves might not).
They aren't unrepentant sociopaths or necessarily even especially self-focused (maybe they can be genuinely considered selfless in a misguided sort of way), they might be deeply troubled by their own actions (while they're doing them, or in hindsight), they have genuine virtues and aren't simply purely "bad people", could even be considered unambiguously good if it weren't for specific flaws, but their actions are some of the time or even much of the time ones that are easy to criticize, in ways that can be extreme or even rightly considered monstrous, for reasons other than either ignorance or the types of weakness a reader is likely to find genuinely sympathetic.
What are people's thoughts on these types of characters? As readers, as writers, advice ON writing such characters? Especially if they're protagonists that should be, even if not necessarily wholly sympathetic then at least likable enough to avoid driving away 99% of the potential audience.