Monday on Comedy Central’s “The Daily Show,” President Barack Obama was asked by host Trevor Noah how he navigated the line between speaking his mind and sharing “true opinions” on race while in the meantime not alienating people.

Obama acknowledged the difficulty but added the caveat the country still hasn’t overcome its legacies of slavery, Jim Crow, colonialism and salvery.

Partial transcript as follows:

You know, my general theory is that, if I was clear in my own mind about who I was, comfortable in my own skin and had clarity about the way in which race continues to be this powerful factor in so many elements of our lives. But, that it is not the only factor in so many aspects of our lives, that we have, by no means overcome the legacies of slavery and Jim Crow and colonialism and racism, but that the progress we’ve made has been real and extraordinary — if I’m communicating my genuine belief that those who are not subject to racism can sometimes have blind spots or lack of appreciation of what it feels to be on the receiving end of that, but that doesn’t mean that they’re not open to learning and caring about equality and justice and that I can win them over because there is goodness in the majority of people.

Another way of saying this is there has not been a time in my public life or my presidency where I feel as if I have had to bite my tongue. There have been times in my public life where I’ve said, “How do I say this diplomatically? How do I say this, as you indicated, in a way that it’s received?”

So there have been very few instances where I’ve said, “Well, that was racist, you are racist.” There have been times where I’ve said, “You know, you might not have taken into account the ongoing legacy of racism in why we have so many black men incarcerated. And since I know that you believe in the Constitution and believe in justice and believe in liberty, how about if we try this?”

Now, some might say, well, you’re not speaking fully truth to power because of that diplomacy. But I don’t think that trying to appeal to the better angels of our nature, as Lincoln put it, is somehow compromised. There may be times where you just have to call things out and name names. But the challenge we face today, when it comes to race, is rarely the overt Klansman-style racism and typically has more to do with the fact that, you know, people got other stuff they want to talk about and it’s sort of uncomfortable.

It’s somebody not getting called back for an interview, although it’s never explicit. Or it’s, you know, who gets the TV acting job, the actress who doesn’t quite look the part, and what does that mean? And in that environment, where you’re not talking necessarily about cut and dried racist behavior, but rather about the complex ways in which society is working these issues through, you know — trying to reach folks in ways that they can hear, I think, is important.

And, I would add, everybody’s got a different role to play. If Chris Rock’s doing stand-up, then there is a benefit to him doing something that is different from the president of the United States doing something. For one thing, you know, he doesn’t have to edit his language quite as carefully because I am still subject to, you know, some restraints — those seven words George Carlin talked about, I can’t use those, as a general proposition because a lot of children are watching. I try to comport myself in a way that my mother would approve of.