'Orange Is the New Black' writer Lauren Morelli comes out

The on-screen drama in "Orange Is the New Black" helped one of the show's writers come to a realization about her own life.

Writer Lauren Morelli came out as gay after examining issues of sexuality in the process of writing the Netflix hit, she says in an essay for PolicyMic.

Morelli, who had recently gotten married to her longtime boyfriend, flew to New York to begin production on the show, not realizing that she would begin to question her sexuality.

The show grapples with the main character Piper's sexuality, as she is caught in a love triangle between her fiancé and her ex-girlfriend, who is incarcerated with her.

"I realized I was gay in fall 2012, one of my first days on the set," Morelli wrote. "I am now out to my family, my friends, and most of my co-workers on 'Orange.'"

Morelli described working on-set of "Orange as the New Black" as "the world's most supportive environment, surrounded by people in the LGBT community, where being a minority of any sort is joyfully celebrated."

"It was in the writers room that I came into myself, surrounded by unconditional love and teasing when I needed it," she continued. "I went through it all on set: I feel in love with a woman, and I watched my life play out on screen."