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.