Former Starbucks CEO Howard Schultz said Thursday that he would be willing to abandon his presidential ambitions midstream if Democrats nominate a centrist who makes it too difficult for him to win as an independent candidate.

Schultz, who made the comments while visiting The Washington Post, has premised his exploration of a presidential campaign on the assumption that Democrats are likely to nominate a candidate that embraces what he calls “far-left” ideas that will turn off enough moderate voters to open space for an independent candidate.

He has paid for internal polling that he says suggest he would be competitive in a three-way race against President Trump and a liberal Democratic candidate such as Sen. Kamala D. Harris (D-Calif.), Sen. Elizabeth Warren (D-Mass.) or Sen. Bernie Sanders (I-Vt.).

A more moderate Democratic nominee, such as former vice president Joe Biden or former New York mayor Michael Bloomberg, could complicate Schultz’s perceived path to victory.

“I would reassess the situation if the numbers change as a result of a centrist Democrat winning the nomination,” Schultz said.

Those comments could influence the internal Democratic debate over the best nominee to take on Trump, giving moderates an opportunity to argue that their nomination would minimize the threat of a Schultz bid.

The comments also shed more light on Schultz’s stated goal of avoiding any actions that help Trump win a second term in office, a grave concern for Democratic strategists who have attacked Schultz as a potential spoiler.

“Trump must not serve a second term,” Schultz said in a Feb. 7 speech at Purdue University. “As I explore whether to run for office, I will do so with the conviction that my final decision must not make his reelection a possibility. I can assure you no one wants Donald Trump fired more than I.”

As it stands, Schultz has said he plans to spend the next three to four months exploring a campaign, with an aggressive schedule of book events and media appearances designed to raise his profile. His campaign team has maintained that early internal polling numbers on his potential bid, including a dial-test poll of his performance at a CNN town hall Tuesday, have been promising.

Schultz on Thursday also sought to clarify his views on race following criticism over his comments during the CNN town hall.

“As somebody who grew up in a very diverse background as a young boy in the projects, I didn’t see color as a young boy, and I honestly don’t see color now,” Schultz said Tuesday during the town hall.

On Thursday, he told The Post he meant that he did not see color as a child growing up in public housing, because everyone got along and his parents had raised him to be open-minded.

“Of course I see color as an adult,” Schultz said. “Of course I understand the issues of racial justice.”

He pointed to his record at Starbucks, including the short-lived 2015 campaign that tried to encourage customers to have candid conversations about race by instructing baristas to scrawl the words “Race Together” on millions of tall-, grande- and venti-sized drinks. Backlash ensued within two hours of its launch, and he pulled the plug to ensure his employees’ safety.

He said that despite that effort’s failure, the attempt to respond to the national division over police killings of African Americans remains one of the company’s proudest moments. He said he was inspired by the protests around the killings to hold companywide meetings for employees to speak openly about race and unconscious bias.

Last spring, following the wrongful arrest of two African American men waiting for a business associate at a downtown Philadelphia Starbucks, the company shut down 8,000 stores for an afternoon to train baristas on how to recognize their racial biases.

If Schultz decides to get in the race, he would have to spend between $37 million and $55 million to gain access to the ballot in all 50 states, according to his adviser Steve Schmidt, a former Republican who managed John McCain’s 2008 presidential campaign. The process would begin later this year.

Democrats are not likely to select a nominee until spring 2020, meaning that under the timeline Schultz has laid out, he could decide to walk away from a multimillion-dollar campaign investment months after declaring his intention to run for president.

Schultz has been critical of Democratic proposals to expand Medicare to replace private insurance, offer government jobs for the unemployed and impose a wealth tax on the assets of the richest Americans. (He also has cast the policies as representing Democratic orthodoxy, when all of the policies are being debated within the party.) He has argued that the “far left” and the “far right” have corrupted political parties to the point that the only solution is disrupting the entire system with an independent candidacy.

Schultz has said he is undecided on whether he would self-fund his entire effort or seek out political donors, but his aides have made clear that the undertaking would be expensive.

“I think a winning presidential campaign, if you were just to throw a dart on the wall and look at the cost of it, I would stipulate around $1.2 billion,” Schmidt said on a recent episode of the Words Matter podcast.

Schultz, who built Starbucks into a global brand over a 40-year career at the company, has a net worth that is estimated by Forbes at $3.5 billion and by the Bloomberg Billionaires Index at $3.85 billion.