Jay Pharoah stars in this Showtime series produced by Jamie Foxx, based on Foxx's life and rise to stardom. (Showtime)

To wear the dress, or to not wear the dress?

It’s a question black male comedic actors have grappled with publicly and privately for generations, and one that Floyd Mooney immediately faces in Showtime’s “White Famous.” The comedy series, which premieres Sunday (and is available on YouTube now), follows a popular black stand-up comic, played by Jay Pharoah, confronting what it takes to appeal to a mainstream audience — you know, getting “white famous.”

For instance, Mooney has a chance at a big project that would help propel his star beyond the comedy club circuit — but he’s asked to play a woman to get laughs.

Although loosely based on the experiences of executive producer Jamie Foxx, Floyd is somewhat mirrored by Pharoah, too. “I felt like I connected with Floyd Mooney immediately,” the stand-up comic and “Saturday Night Live” veteran said in an interview.

Hailing from Chesapeake, Va., Pharoah, who turns 30 Saturday, has been performing since he was a teenager and toured with comics such as Charlie Murphy before joining SNL in 2010.

“I felt like we were on similar paths — of course his career is a little bit different — but our stories are synonymous,” Pharoah said of the character he plays. “Being hot on the underground and trying to cross over into the industry, and then Floyd trying to keep his moral code.”

“White Famous” was co-created by Tom Kapinos, the man behind Showtime’s big hit “Californication.” He said he was drawn to the show in part because of the subject matter and “the sense that for a black comedian, the concept of ‘selling out’ is just much more vivid” than for a white comic.

While at first hesitating over whether to try to help develop the series — “I don’t know if I’m the guy for this,” Kapinos recalled — he changed his mind after meeting with Foxx. “It was hilarious. We had an hour-and-a-half meeting and it was like a one-man show,” Kapinos said.

Jamie Foxx, left, as himself and Jay Pharoah as Floyd in “White Famous.” (Michael Desmond/Showtime)

Pharoah met Foxx when the comedic veteran hosted SNL in 2012. “We connected immediately. He told me,” then Pharoah broke into a spot-on Foxx impersonation, “I think you’re talented, I think you’re talented, man. You know, I want to work with you, I want to work with you.”

Foxx would later explain that while Floyd Mooney “is like almost every comedian who’s trying to cross over,” Pharoah recalled, some of the character is also based on specific people besides Foxx, like Eddie Murphy, who would confide in and seek advice from his former wife, Nicole.

In the show, Mooney also is co-parenting with his ex-girlfriend and love of his life, Sadie (Cleopatra Coleman). “I think I subconsciously borrowed from ‘Californication’ with the family dynamic,” Kapinos said. “Beyond a comedian wanting to be successful, he has a woman he loves and he has a kid with her, and it’s about trying to balance all that.” (In fact, “White Famous” is set in the same fictionalized Los Angeles, with some minor characters from “Californication” popping up, such as Stu Beggs, played by Stephen Tobolowsky. “If you’re a fan, it’s just a fun little nod,” Kapinos said.)

There are other striking parallels with Pharoah’s own experience, he said, such as Mooney’s best friend (Jacob Ming-Trent), who helps his character keep “his moral code and his values,” Pharaoh said. “I really do have that in my life.”

He doesn’t want to divulge some of the specific story lines Mooney encounters during the show’s run, but said, “The topics that we do touch on are so talked-about behind closed doors. These things happen all the time but like there’s not a spotlight on any of them.”

“I don’t know if I can give you any specifics. I mean, I’ve had a lot of experiences with weird folks in the industry — I’m not going put out celebrity names, but there are some weird people in Hollywood,” Pharoah said.

Jay Pharoah as Floyd in “White Famous.” (Michael Desmond/Showtime)

In the first set of episodes, we see Mooney endure bizarre meetings with producers, and he gets caught up in a controversy after one producer’s racially-charged encounter with him goes viral. And expect to see a few impersonations, but not too many; Pharoah has a strong impression game, from Denzel Washington to Jay-Z. Most notably, he played President Obama for years on SNL for six seasons before his stint at the flagship NBC comedy show ended a year ago.

In an April interview with Hot 97, Pharoah talked about how SNL puts “people into boxes” and being asked to wear a dress on the show and saying no. Now, when asked how his SNL experiences, good or bad, have impacted him, he responded, “Well, I’m not speaking in the negativity because, first of all, that’s my family.”

“But I mean, SNL was a launching pad. It was a starting point,” he continued. “That place was comedy boot camp and once you get out of there, you’re ready for anything.”

Even though shooting multiple takes and not performing in front of a live audience differs from SNL, “the training that I did have from before kind of reinforced and empowered me to get things done quicker,” Pharoah said. “I like one takes, those are cool, but the fact that you can do it again — it just gives you a chance to put variety out. You give them different variations of the line.”

Mooney faces pressure from his agent and others in the industry to do whatever it takes to get “white famous.” In real life, Pharoah said he’s managed to avoid compromising his values in pursuit of recognition. He credits his “good home base,” which includes his sister, who serves as his manager, and his parents and family, who are still a big part of his life.

“I still go to my grandma’s house and eat with her when I get down there, you know, the things that I always did before, I still do, and I think that’s kept me grounded,” he said. “I think my view will always be the same: You don’t have to compromise yourself to get where you want to go, especially with so many avenues and so much access that the world has right now.”

White Famous (30 minutes) premieres with two episodes Sunday at 10 p.m. on Showtime.

Read more:

The new rock stars: Inside today’s golden age of comedy

Dave Chappelle is back on top. Would he really walk away again?