Chyler Leigh has publicly spoken about her sexuality for the first time.

In an essay posted to Creating Change, an LGBTQ+ organisation she co-founded, the actress said the coming out journey of her Supergirl character Alex Danvers helped her come to terms with her own sexuality.

“When I was told that my character was to come out in season 2, a flurry of thoughts and emotions flew through and around me because of the responsibility I personally felt to authentically represent Alex’s journey,” she wrote.

“What I didn’t realize was how the scene where she finally confessed her truth would leap off the pages of the script and genuinely become a variation of my own. IRL.

“My heart felt like it was going to beat out of my chest each take we filmed, every time presenting another opportunity to get those honest words out of my mouth. Though they don’t exactly match my personal dialogue, the heart behind it surely did.”

Leigh said the groundbreaking scene has since been hailed by fans, the cast and mainstream media as the “most realistic coming out scene” on television “because there’s some truth to what she said about me.”

Despite the overwhelmingly positive response from the aforementioned scene, Leigh revealed that some of her “dear friends” would no longer watch the series because “Alex’s journey took from their less than acceptable beliefs.”

She explained: “Soon after, they began to distance themselves and eventually my family and I were outcast, marking the loss of many folks we loved. However, after the initial sting, I don’t hold a grudge towards the negative response.

“As I said, we all have had a hard time in one way or another with acceptance (whatever the subject may be) whether towards ourselves or others.”

Leigh concluded her essay by saying it’s been a “long and lonely road” for her and her husband, and they are still discovering their most authentic selves, “but throughout our journey we’ve learned to be proud of who we are, no matter the cost.”

The actress has played Alex Danvers, the adoptive sister of the title superhero, since Supergirl’s 2015 debut. She has since reprised the role on various Arrowverse productions such as Arrow, The Flash and Legends of Tomorrow.

Leigh is also known for her five-season stint as Lexie Grey on Grey’s Anatomy, for which she received universal acclaim.

Supergirl has received praise throughout its six-season run for its LGBTQ+ representation. As well as Alex and her girlfriend Maggie (Floriana Lima), the show features a transgender hero called Dreamer (Nicole Maines).

You can read our digital cover story with Nicole here.