A promo shot for Kesha’s ‘Rainbow’; Photo: N/A

Kesha released more than just her album, Rainbow, today.

She wrote an open letter to the world published on Refinery29 titled Kesha: “What’s Left Of My Heart Is Fucking Pure Gold & No One Can Touch That.” The essay is all about the emotion behind making music and structuring the album, and how it kept her afloat while going through rehab.

In the article, the 30-year-old singer-songwriter she pleaded with the rehab center to allow her to play an instrument during her time there. Eventually, they let her play the keyboard for one hour per day — and for that one hour every day, she wrote the songs of Rainbow.

“Writing songs is the only way I know how to process things,” Kesha wrote. “The whole album idea and tour and everything, came from me crying and singing and playing and dreaming until my hour was up and they took the keyboard away again. Every day I would just cry and play that song because I knew I had to get through that incredibly hard time. I knew I had to change and learn to take care of and love myself, and I had no idea how to even begin.”

So it turns out there is something good at the end of the rainbow, hers anyway.

While writing the title track, she found strength to keep going — the song gave her the legs to stand up and eventually walk out of that rehab center.

“‘Rainbow’ was the beginning of me turning that around and being kind to myself,” she wrote. “It is a reminder that I can make it through anything. I hope this song exudes hope and self-love, because each of us deserves it.”

This is all amid the legal battle with her former producer and boss Dr. Luke, whom she says sexually assaulted her. And she loves this one line in the song “Rainbow:”

What’s left of my heart is still made of gold

“I truly believe that,” she wrote. “It’s true for me and it can be true for others, too. I know giant pieces of my heart have been held captive in the past. But not anymore. And what’s left is fucking pure gold and no one can touch that.”

Watch the official video for “Rainbow” below: