With the Celtics fading in the first round, the chances of Carmelo Anthony wearing green are increasing.

According to an NBA source, the Celtics coaching staff was in favor of trading for Anthony at the trade deadline, but general manager Danny Ainge had too many reservations. One of Ainge’s concerns, according to a source, was an Anthony trade would have given Boston no real cap space to work with for the 2017 free-agent class.

With the top-seeded Celtics possibly on their way to getting swept by the eighth-seeded Bulls, Ainge’s thoughts on adding Anthony could change this July.

The Post has learned that in talks with the Celtics, their defensive small forward Jae Crowder would be a major player of interest for Knicks president Phil Jackson. In fact, Jackson lamented not trading for Crowder when he was on the table in the 2014 trade talks with the Mavericks for Tyson Chandler. Crowder is an active, gritty defender who can shoot from 3-point range.

The Celtics long have been thought of as a sensible destination for Anthony because of their expiring contracts and trove of draft picks that will include the Nets’ first-round selection (Boston is seeded first in the May 16 lottery, though that pick is off limits).

Nevertheless, Boston’s expiring contracts — Amir Johnson ($12 million), Tyler Zeller ($8 million), Jonas Jerebko ($5 million), Gerald Green ($1.4 million) — become frozen on June 22. That means a trade is not likely until July.

The Celtics, if they renounce the rights to those free agents, could have between $25 million and $30 million of cap space to absorb Anthony’s contract if Ainge doesn’t have any success in the free-agent market, according to The Vertical’s Bobby Marks, the former Nets assistant general manager.

The rights to the Celtics’ 2017 draft picks could also be part of a July package. The Knicks have two second-round selections and the Celtics have three.

Boston trails the Bulls 2-0 as the first-round series shifts to Chicago for the next two games. The Bulls have been buoyed by ex-Knicks center Robin Lopez and young point Jerian Grant, both acquired in the Derrick Rose trade.

As feared, the Celtics haven’t had enough firepower in the fourth quarter, relying solely on 5-foot-10 point guard Isaiah Thomas, who has played the series heartbroken after the tragic death of his sister last weekend. Ainge reportedly has sought another sniper for two seasons.

During his end-of-season press conference a week ago, Jackson was likely alluding to the Celtics, Clippers and perhaps Wizards when he said playoff fates could be determining factors in Anthony’s future.

“You’ve got teams going into the playoffs who could be eliminated right away and say, ‘That’s not good enough, we’re not good enough. We’ve got to go somewhere else,’ ” Jackson said. “You lose in the first round, well, it didn’t work out. We gotta change some people on our team. So there may be some quick outs that may change some people’s minds as to what they’re going to do. We had teams that were interested in making the chase.”

Anthony has his no-trade clause and personal issues with a potential divorce ahead with his wife, La La Anthony, that could lead to a custody battle over their 10-year-old son, Kiyan. Anthony said before the trade deadline his family was a big factor in any decision to leave New York. But he also said “winning’’ was a big priority, too.

When the Knicks were in Boston in February, Anthony was asked if it would be strange to be a Celtic after growing up in Brooklyn and Baltimore despising them.

“It may be strange to you,’’ he said.

Jackson trumpeted his desire to move Anthony last week — so heavily that he drew a rebuke from the players union, which reported him to the NBA commissioner’s office.

A source specified the technical reason for Jackson’s desire to move Anthony, whose style is so rooted in isolation play. It damaged chemistry and prevented Jackson’s move-the-ball-to-the-open-man philosophy, the source said.

Players, the source said, deferred too much to Anthony, whether in the triangle or in Jeff Hornacek’s speedier attack.

“It’s just not how Phil wants to play,’’ the source said. “He’d work well on a team who likes to play isolation.’’

In his press conference, Jackson paid Anthony some compliments, calling him a future Hall of Famer and saying, “Obviously, it hasn’t worked out. This partnership together, somehow or the other, didn’t click here with this team. But he has done his role and played his role quite well.’’