Cannes: Justin Timberlake, Anna Kendrick Explain How Their "True Colors" Performance Happened

Plus, Timberlake shows off his impressions of Arnold Schwarzenegger and Danny DeVito.

When Justin Timberlake and Anna Kendrick rehearsed their duet of "True Colors" ahead of Wednesday's performance at the Cannes Film Festival, it was the first time the two Trolls actors actually sang the song together.

"When I sang my side of 'True Colors,' Justin had recorded his part already," Kendrick tells The Hollywood Reporter of creating the Cyndi Lauper cover for the DreamWorks Animation film's soundtrack. "At the end of the day I felt like, 'Wow, I really spent the day doing some intense, emotional work with Justin.' It was his voice from like two weeks earlier."

As for the Cannes performance, the idea "came up out of the blue," says Timberlake, "as the brain-child of the one and only [producer] Jeffrey Katzenberg." Timberlake recalls Katzenberg's pitch was, "We'll go on this press tour, and we'll end up in Cannes, and you guys will just show up. Justin, just bring your guitar, and then you guys just do the song."

"We were like, 'Hold on,'" Timberlake adds. "It's a little more complicated than that."

The film's directors, Mike Mitchell and Walt Dohrn, loved working with Timberlake and Kendrick. with Mitchell saying, "They're really funny people, and they both can sing beautifully." Dohrn adds, "We call it their magic trick."

Watch Timberlake and Anna perform "True Colors" at Cannes below.

Watch the trailer for the upcoming film Trolls below.