A few months after President Trump took office, Lorne Michaels, producer of “The Tonight Show,” was in a meeting with fellow television executives when one of them asked him about a threat to the late-night juggernaut. Was he worried that his program could face a ratings swoon because host Jimmy Fallon was much less political than rival Stephen Colbert?

Michaels said he wasn’t. “He brushed it aside,” said a person at the meeting who spoke on the condition of anonymity because they were not authorized to talk about it. “He didn’t seem concerned at all. He just said that the pendulum would swing back, and Fallon would be fine.”

Michaels turned out to be mistaken. The longtime reigning king of late night, “The Tonight Show” has been steadily losing the race for total viewers to CBS’s “The Late Show” as audiences seem to prefer the acerbic anti-Trump comments of the show’s host, Colbert, to Fallon’s nonpartisanship.

Late-night TV viewers are “making their decisions based on what’s happening in the White House,” said Rick Ludwin, who ran NBC’s late-night programming for years.

A year and a half into the Trump presidency, entertainment companies are grappling with a fan base that is splintering into political factions as never before. Whether in regard to explicitly political entertainment or the rapidly multiplying number of entertainers who talk about politics, Americans appear to be increasingly figuring ideology into their Hollywood ­choices.

Some fans, to be sure, have long been drawn to or repelled by the occasional outspoken celebrity — Jane Fonda for her antiwar views, for example. But fans are now judging a much wider range of entertainment and entertainers for the way those people express their views in America’s increasingly polarized climate. These days, how fans feel about stars can be as much about ideology and outspokenness as it is about roles and personal style.

“It’s a totally new world,” said Elizabeth Currid-Halkett, a professor at the University of Southern California who wrote the book “Starstruck: The Business of Celebrity.” “People look at politics when deciding how they feel about a host or actor. Pop culture has now become one more thing that divides us, just like cable news and social media.”

Examples of fans embracing — or rejecting — entertainers because of their politics now occur regularly.

Republican fans of Robert De Niro vowed to boycott the actor’s movies in June after he stood up at the Tony Awards and, to the surprise even of those closest to him, unleashed two expletives at the president on live television.

In July, some liberals on Twitter called for a boycott of Mark Duplass, believing the Democratic actor-creator known for “The League,” “Togetherness” and “Wild Wild Country” had violated the party’s ideals when he urged followers on Twitter to listen to conservative blogger Ben Shapiro. Duplass later walked back the endorsement.

Other parts of the business have been trying to figure out how to digest strong political feelings in their own ranks. In June, at the height of the family-separation controversy at the border, “Modern Family” creator Steve Levitan tweeted that he was “disgusted” to work for a studio, 20th Century Fox Television, that is also home to Fox News, noting that “23-hour-a-day support of the NRA, conspiracy theories and Trump’s lies gets harder to swallow every day as I drive onto that lot to make a show about inclusion.” He said he would not renew his deal with the company.

The news caused a ripple both at Rupert Murdoch’s corporation and among his representatives. Levitan eventually issued a statement, via his representative at the United Talent Agency, walking back his promise not to renew his deal.

Fan feelings became intensely tangled up with politics in the instance of Disney and James Gunn, director of the “Guardians of the Galaxy” film series. Last month, far-right activists, in part via the conservative Daily Caller, resurrected old Gunn tweets in which he joked about rape and pedophilia.

The activists, who said they were motivated by Gunn’s anti-Trump comments, urged Disney to fire him just as it did “Roseanne” star and Trump supporter Roseanne Barr for a racist tweet in May. Conservative fans echoed their calls. (Gunn offered an apology and explanation, saying he had evolved in the years since he sent the tweets.)

The studio quickly let Gunn go. But no sooner had executives made their decision than other fans, many of them prominently liberal, responded with a call for reinstatement, as did the principal cast of the movies. A Change.org petition imploring the company to rehire Gunn has garnered more than 390,000 signatures.

“Disney shouldn’t give in to reactionary right-wing forces,” one fan wrote on the petition

For stars like De Niro, who seldom headline the kind of movie built to take in hundreds of millions at the box office, outspokenness could be of considerable benefit. That’s especially true because of the multiplying opportunities for actors — De Niro’s next major movie, “The Irishman,” is with Netflix, sparing him a box office referendum.

“Anti-Trump sentiment is a net negative if you evaluate your income based on every last person’s willingness to support you with a ticket purchase,” said Eric Schiffer, the chairman of Reputation Management Consultants, which specializes in celebrity image. “But it’s also a rocket tied to his back for the many who agreed with him — it enhances the loyalty factor exponentially.”

That’s true of Colbert, too. The host — who regularly offers up lines such as “Trump wasn’t the only one lying to the American people, so were the liars who work for this liar” — no longer needs the tens of millions that a Johnny Carson, Jay Leno or David Letterman needed to win the night. There simply aren’t that many people watching broadcast television at 11:30 p.m. (As of last week, Colbert was beating Fallon in average total weekly viewers in 2018 by a count of 3.76 million to 2.59 million.)

“Part of the issue now is that the bigger the base, the more you have to worry about offending it,” said a television marketing expert, who spoke on the condition of anonymity because of the sensitivity of the subject. “The climate actually puts the fragmented in a better position to make political statements.”

For his part, Fallon has tried to adjust. In June, he sought to walk back a 2016 Trump appearance that critics said normalized the then-candidate. It went over poorly — liberals didn’t buy it, and the president tweeted that the late-night host was “whimpering.”

More recently, Fallon has attempted to nab a piece of the anti-Trump viewership with recurring segments like “the Trump Network News.” The host is relying on his comic gifts to poke fun at Trump but is in the more gentle, nonideological vein of Carson and Letterman, who rarely betrayed their politics — unlike Colbert, who makes no secret of his allegiance. So far, Fallon has not made a dent in Colbert’s total-viewer lead.

“It’s treacherous for anyone who’s not political to start floating into political waters,” said Daniel Kellison, a longtime talk-show producer who has worked with Jimmy Kimmel, Letterman and Rosie O’Donnell. “If it’s not who you are, you can’t just start doing it — the audience smells that immediately.”

Michaels and Fallon, via an NBC spokesman, declined to comment.

But while the increased political speech can help those appealing to a smaller audience, it creates headaches for those who try to reach wider swaths of America.

For years, Jennifer Lawrence was the biggest movie star in the country, driving “The Hunger Games” to nearly $1.5 billion in U.S. box office receipts between 2012 and 2015.

Since the election of Trump, Lawrence has been more outspoken about the White House, saying in interviews that the administration has become “almost an obsession.” In an interview in December, she said she wanted to take a “martini to the face” of the president, prompting a retort from Donald Trump Jr. online. Since she began speaking out, Lawrence has had several box office disappointments — “Passengers,” “mother!” and “Red Sparrow.” While only the first was expected to be a broad hit, the latter two underperformed, even with their more modest expectations.

It’s impossible to know whether Lawrence’s outspokenness directly influenced the box office sales, but people in Hollywood are taking the possibility into account.

“I don’t think parts of Middle America want to hear from her now the way they once did,” said an agent at a company that competes with Creative Artists Agency, which represents Lawrence. The agent acknowledged that a few of his own company’s clients have run into similar challenges.

The entertainment industry is still searching for answers about how to best address this new age.

After Samantha Bee spurred controversy by calling Ivanka Trump an obscenity, the Academy of Television Arts & Sciences faced a dilemma earlier this year.

The group was set to honor Bee the night after she made her four-letter remark about the first daughter, and a slew of reporters who had been credentialed for the event were sure to ask her about it.

After conferring with the comic’s publicity team, the TV Academy, one of Hollywood’s most august institutions, made a stark decision: It would continue with the Bee segment but revoke the credentials of many of the reporters.

“They decided to pull them all,” said a person involved with the event who spoke on the condition of anonymity because they were not authorized to speak about the matter. “Instead of letting her face the music or even canceling the segment, they just made a decision to try to avoid the media. I’m not sure I’ve ever seen that before.”