Chris Colfer of ‘Glee’ says he was advised not to come out early in his career

Chris Colfer played a character on the hit series “Glee” who was gay, but he had not yet publicly identified himself as a gay man when he first started playing the role.

Colfer played Kurt Hummel, one of the first openly gay teen characters on prime time television, for six seasons on “Glee.” He was asked about his own coming out experience during an appearance this week on “The View.

He said he grew up in a “very conservative town” where being openly gay was “dangerous.”

“I remember when I got on the show the role was written for me and I did not know what the role was going to be,” he explained. “When I read the script for the first time I saw it was an openly gay character and I was terrified. And when I started doing the show I had a lot of people tell me ‘Don’t come out whatever you do because it will ruin your career.’”

Consequently, Colfer said, he “hid” his sexuality for some time.

“But I also told them, ‘I can’t hide it with my voice. I’m more effeminate than most people. I can’t hide it,’” he explained. “And they said, ‘Don’t worry. As long as you never address it, you’ll be rewarded for it in the end.’”

What convinced him to go public, he said, was an encounter with a young viewer who secretly slipped him a note that included a rainbow colored chain of paper clips and the words, “thank you.”

“In that moment I knew, I have to come out,” he said.

Colfer said that even though being out might limit his opportunities for roles, he believes that “being a beacon of positivity and providing that comfort for people is way more important than attention.”

For more CNN news and newsletters create an account at CNN.com