There was a moment in 2010 when it felt like every pop star was singing the Song of Female Empowerment, which could conveniently also be marketed as a gay anthem: a super-catchy track about celebrating your eccentricities and showing your haters to the door. Katy Perry (“Firework”), Pink (“Raise Your Glass”) and Taylor Swift (“Mean”), still ensconced in Nashville, had one; Lady Gaga’s “Born This Way” was delivered early the following year. An upstart named Kesha released one, too — the No. 1 “We R Who We R,” a pounding electro-pop sister to her hit that ruled 2010 by every conceivable metric, “Tik Tok.”

Kesha’s two perky tracks and her rock ’n’ roll back story — she said she dropped out of high school to chase her musical dreams, and dropped into Prince’s house to deliver a demo CD — established her as a charming underdog, a raised fist of chipped nail polish to the established stars’ high-gloss manicures. She was sharp-tongued, goofy and most effective when battling an adversary. On her debut album, “Animal,” and its follow-up EP, “Cannibal,” the opponent was propriety (and sobriety). On her 2012 LP, “Warrior,” she added bullies and self-doubt.

Image “Rainbow”

On “Rainbow,” Kesha’s first new music since she featured on the rapper Pitbull’s twang-hop hit “Timber” in 2013, there’s no question who the enemy is: Dr. Luke, the hitmaker who shepherded all of her prior releases. In 2014, Kesha filed a lawsuit seeking to end her recording and music publishing contracts with the songwriter and producer, who she said subjected her to physical and emotional abuse. Dr. Luke, born Lukasz Gottwald, denied the accusations and fired back with lawsuits of his own. As of now, the two are still legally tied, though Dr. Luke didn’t work on the new album.