Demi Lovato's 'Cool for the Summer' was inspired by a famous woman she had a sexual relationship with.

The 31-year-old singer admitted her parents weren't surprised when she came out as bisexual because of the raunchy lyrics to the track, but she's refused to say who it was inspired by.

Speaking on 'The Howard Stern Show', she said: "I was thinking about the hookups that I had had with a girl and decided to write this song. I wasn’t afraid of how it would affect my career … it was more so like coming to terms with it myself, like I didn’t actually come out as bisexual until I was 24 or 25. I think coming from a Christian household made me nervous for that.

“When I came out, my dad was like, ‘Yeah, you have a song called ‘Cool for the Summer,’ like it’s obvious.'

"[My mom] was like, ‘I just want you to be happy.’”

Asked if she would ever tell the woman, she smiled: “I’m in a relationship now and I feel like that would be inappropriate."

The show's Robin Quivers quipped: “Now it’ll become like the ‘You’re So Vain’ thing. Who is this song about?”

Demi - who is now in a relationship with musician Jordan Lutes aka Jute$ - has always found it hard to find a serious relationship with a woman.

She explained: “What’s happened in the past is like they just want a hook up and it’s like I actually wanted something more serious, so it ends up not working.”

When she was just 10 years old, the 'Confident' hitmaker was part of the cast of children's TV show 'Barney + Friends' - and she confessed to having a "bit of a crush" on the guy who played the titular big purple dinosaur.

She said: “He was so nice. And you know what’s funny? He was really attractive … I had a bit of a crush on him, even at a young age.

“You had to be really muscular because the suit weighs, I don’t know, 50 to 100 pounds. So, he was like ripped, and he happened to have a good looking face.”