January 15, 2022 | 2:03pm

Brian Cox doesn’t hold back in new memoir, “Putting the Rabbit in the Hat,” as he calls out several celebs who’ve rubbed him the wrong way, including “Pirates of the Caribbean” star, Johnny Depp.

“It would have been a money-spinner, but of all the parts in that film it was the most thankless,” Cox, 75, wrote of turning down the part of the Governor in the “Pirates” franchise, which eventually went to Jonathan Pryce. “Plus, I would have ended up doing it for film after film and missed out on all the other nice things I’ve done.”

He continued in excerpts obtained by GQ, “Another thing with ‘Pirates of the Caribbean’ is that it’s very much the ‘Johnny Depp as Jack Sparrow’ show, and Depp, personable though I’m sure he is, is so overblown, so overrated.”

Doubling down, the “Succession” actor continued, “I mean, ‘Edward Scissorhands.’ Let’s face it, if you come on with hands like that and pale, scarred-face make-up, you don’t have to do anything. And he didn’t. And subsequently, he’s done even less.”

Cox is not a fan of “overblown” and “overrated” Depp.
Getty Images

The Golden Globe-winner went on to suggest that Depp’s star-power is slowly dimming, adding, “But people love him. Or they did love him. They don’t love him so much these days, of course. If Johnny Depp went for Jack Sparrow now, they’d give it to Brendan Gleeson.”

Cox also took time to praise director Spike Lee, who according to the star, put actor Ed Norton “in his place” while filming 2002’s “25th Hour.”

Brian Cox won a Golden Globe in 2020 for his role on HBO’s “Succession.”
Getty Images

“Ed Norton was in the film and he’s a nice lad but a bit of a pain in the arse because he fancies himself as a writer-director,” Cox wrote.

“He and I had this scene set in the bar owned by my character. Spike set it up immaculately, but Ed came in and was saying, ‘Now, I’ve done some work on the script and I’ve got a few ideas and I’d like you to think about them. I’ve rewritten a few things in there …’

“Spike was like, ‘Oh, good, let me see.’ He had a look at Ed’s notes and then said, ‘Well that’s very interesting. Okay, so what we’re going to do now is …’ and put Ed very firmly in his place.”