Every actor hopes to make the world a better place. Sidney Poitier actually did it.

Feb. 20 marks the 89th birthday of Poitier, who was born in 1927 and who changed Hollywood. The film industry’s lack of diversity is still an issue, as the Oscar nominations furor reminds us. But it was even more extreme when the actor made his film debut in the 1950 “No Way Out.” There were other black actors in lead film roles, including James Edwards and Harry Belafonte, but they were extremely rare. And Poitier captured the public imagination like no one before him, with his soft but powerful voice, his precise way of speaking (with that slight, unidentifiable accent from the Bahamas) and, crucially, his integrity.

A Dec. 11, 1957, article in Variety announced his casting in the film “Porgy and Bess.” Poitier said he’d originally turned down the role, due to “the fear that if improperly handled, ‘Porgy and Bess’ could conceivably be, to my mind, injurious to Negroes.”

This was a simple but extraordinary statement. At that point Poitier wasn’t a major star, having made only six films in seven years; his breakthrough in the 1958 “The Defiant Ones” was still a year away. And most actors, especially black actors in the 1950s, were happy to get any work at all. What’s more, “Porgy and Bess” was a high-profile project, based on the Gershwins-DuBose Heyward prestige hit, directed by Otto Preminger and produced by Samuel Goldwyn. But he had his principles and he stuck to them.

For the next few decades, Poitier enlightened audiences by bringing three-dimensional characters to people who may have never met a black person, much less enjoyed their company for a few hours. He played characters that people wanted to know better.

Liberals sometimes sniffed that his roles in “Lilies of the Field” (for which he won an Oscar), “A Patch of Blue” and “To Sir With Love,” among others, were too idealistic. The 1967 “Guess Who’s Coming to Dinner” hinges on the question of whether Katharine Hepburn and Spencer Tracy will approve Poitier’s engagement to their daughter (Katherine Houghton). The joke among Hollywood sophisticates was that she wasn’t good enough for him.

But those criticisms misunderstand the national and international mood. Only six months before the film’s release, interracial marriages were still illegal in 17 of the 50 states, or one-third of the country. In June 1967, the Supreme Court overturned those laws. While “Guess Who’s Coming’s” message of tolerance may seem simplistic today, it was an eye-opener to many.

Also controversial that year was “In the Heat of the Night,” which won the best-picture Oscar. As a northern detective involved in a murder investigation in Mississippi, Poitier’s character Virgil Tibbs exhibited all of the actor’s virtues: Intelligence, decency, humor, sensitivity and a boatload of charisma.

Tibbs maintains composure as he is hampered in his investigation by bigots. At one point, a powerful local Caucasian man slaps Tibbs, who slaps him back. It’s hard to convey how shocking that was to some audiences — and cathartic to others.

The movie came out only three years after the federal Civil Rights Act, which was passed in 1964 after a D.C. debate about the pros and cons of equal rights. More than one-fourth of Congress had voted against it.

As news events frequently remind us, racial equality is still an ongoing struggle, even after all these years. But Sidney Poitier made a difference. He’s still a reminder of what people — and Hollywood — are capable of.