Public Advocate Letitia James on Tuesday came out in support of legalizing marijuana — and said she’ll be working with Gov. Cuomo’s office to get it done by the end of the year.

James said she shifted to the legalization camp largely because of NYPD data showing that black and Hispanic residents continue to be arrested for on marijuana charges at much higher rates than whites despite surveys showing relatively equal usage.

“The benefits clearly outweigh the negative impacts — economically, criminal justice reform and also in terms of the racial arrests,” James said outside state Supreme Court in Manhattan.

She said a study was needed even though eight states and Washington D.C. have already legalized recreational marijuana because of a host of issues — including the push by some advocates and elected officials to expunge marijuana-related arrest records post-legalization.

Gubernatorial candidate Cynthia Nixon has put the issue in the limelight by backing legal weed, a stance at odds with both Cuomo and Mayor de Blasio.

“The governor of the state of New York is studying the issue,” said James. “The mayor of the city of New York, again — I don’t see how you can call yourself someone progressive, a leader of the city of New York, and not come out or at least consider the prospect of legalizing marijuana given the adverse impact on communities of color.”

James said she personally has never smoked marijuana.

A Siena poll released Tuesday showed 52 percent of voters in the state support legalization, while 44 percent still oppose it.