When Yahya Abdul-Mateen II was first cast on HBO’s “Watchmen,” he didn’t know he would be playing Dr. Manhattan, a godlike superhero with glowing blue skin. Instead, he thought he was simply playing Cal Abar, the husband of lead character Angela Abar (Regina King), not a part of the central conceit of the show and the 1986 graphic novel on which it’s based (which was: What if costume vigilantes were a real thing in the 20th century and changed the course of history?).

“In the pages that I got for the audition, he’s the most ordinary person,” Abdul-Mateen says. “He’s definitely not a superhero.”

It wasn’t until after shooting the “Watchmen” pilot that showrunner Damon Lindelof sat Abdul-Mateen down to explain that not only was Cal in truth the least ordinary person imaginable, but also the character had no idea he was the most powerful being on Earth.

Lindelof says the writers realized early on Dr. Manhattan would have to hide in plain sight to avoid having to constantly explain why the character wasn’t using his near-omnipotent abilities to affect the story.

Far trickier was the decision that Dr. Manhattan would be Angela’s husband — and transform from a white man who became blue to a blue man who became Black.

“Dr. Manhattan taking the form of a Black man probably comprised more time in the [writers’] room than any other idea,” says Lindelof. “There were days where it felt very problematic, and then there were days that it felt like it was challenging the status quo in a really interesting way. I think that the reason — maybe the only reason — that it worked is Yahya.”

The full reveal of Cal’s true nature was held until the penultimate episode of the limited series and that gave Abdul-Mateen time to transform himself into the new role.

To get the character’s blue skin right, Lindelof flew the actor from the Georgia-based production to Los Angeles to undergo a series of top-secret make-up tests.

“It’s fun, the first couple of times,” Abdul-Mateen says of the 2½-hour process. “All ideas about personal space, they just go out the window.”

To capture Dr. Manhattan’s voice before his transformation into Cal, Abdul-Mateen says he studied the voices of “white males who I thought were hyper-intelligent” — starting with Lindelof.

“I did not know this,” says Lindelof. “While my first-grade teacher did call me hyper, I’m not so sure about the other part of the hyphenate. I will stipulate that I’m incredibly white.”

Abdul-Mateen was especially eager to ensure that his body was in peak condition, for the simple reason that Dr. Manhattan rarely bothers with clothing. The same day Lindelof told him about the true nature of his character, Abdul-Mateen says he got a trainer, “because I knew that there would be a high possibility that I would have to be naked.” (Lindelof and Abdul-Mateen both stress, however, that the ultimate decision to be nude was always the actor’s to make.)

One of the most satisfying scenes for Abdul-Mateen, ironically, is the one in which he simply looks like himself, when Angela shows Dr. Manhattan the body of the Black man she’d prefer him to transform into so they can be together without the world knowing where Dr. Manhattan is — and he does, without hesitation.

“It says something about God, giving the power of choice to a Black woman,” says Abdul-Mateen. “I think that is really f—ing dope, that people can see that power.”