A developer has been tagged with a $6.7 million judgment for whitewashing the “formidable” work of 21 graffiti artists on the iconic 5 Pointz warehouse in Queens.

Brooklyn federal-court Judge Frederic Block on Monday angrily ordered developer Gerald Wolkoff — who erased about 45 works overnight in the middle of both sides’ court case in 2013 — to cough up the millions.

“The shame of it all is that since 5 Pointz was a prominent tourist attraction, the public would undoubtedly have thronged to say its goodbyes during those 10 months and gaze at the formidable works of aerosol art for the last time,” Block wrote in his decision. “It would have been a wonderful tribute for the artists that they richly deserved.”

The jurist noted that Wolkoff’s rash decision to ignore the legal proceeding and take matters into his own hands had sealed his fate and prompted the whopping judgment.

The artists sued him under a 1990 law, the Visual Rights Act, which protects works that are considered notable.

“If not for Wolkoff’s insolence, these damages would not have been assessed,” Block said. “If he did not destroy 5 Pointz until he received his permits and demolished it 10 months later, the Court would not have found that he had acted willfully.”

Block lauded the artists for comporting themselves “with dignity” during the pendency of the case.

Monday’s decision follows a three-week trial in November in which lawyers for Wolkoff unsuccessfully argued that the graffiti artists should have known better than to paint the site, given its slated fate.

5 Pointz was torn down in 2014, and the land that once housed the famed painted warehouse is now home to two luxury high-rise residential towers.