The Oscars diversity controversy was the centre of attention at the NAACP Image Awards, as host Anthony Anderson poked fun at the #OscarsSoWhite hashtag and the Academy Awards boycott.

The former Law & Order star, who won the award for best actor in a comedy series at the 47th annual ceremony on Friday, dedicated a portion of his opening monologue to the ongoing controversy surrounding the Oscars and the lack of black actors in the nominations for the second year running.

"Look at all of these beautiful shades of people in the audience," he told the star-studded crowd. "Hollywood needs to know that this is what diversity is supposed to look like. I love seeing all these faces black people working. Everybody keeps saying it's a comeback. But hell, don't call it a comeback. We've been here for years."

Upon spotting Will Smith and wife Jada Pinkett Smith, who both waded into the Oscars boycott row last month, Anderson joked, "They better be here after all this ish (sic) they started!"

The host ended his monologue with a heartfelt plea to organizers of the Academy Awards, adding, "Although we have our own awards show, I just want the other ones to be fair. I just hope they don't go overboard next year and nominate too much black stuff out of guilt. This is about us. This is our show and it's not a comeback. We have been here and we aren't going anywhere."

Anderson then aimed his humour at actress and Fox News contributor Stacey Dash, who has criticized the diversity debate in Hollywood and called for awards shows such as the NAACP Image Awards to be scrapped.

Jokingly calling her to the stage as the first presenter of the evening, he quipped, "Everybody give a round of applause for Stacey Dash! What the hell is she doing here Doesn't she know that the Fox network is using her?... Baby, don't let them use you! Come back to the black people!"

During the ceremony at the Pasadena Civic Auditorium in California, John Legend was given the President's Award for his public service, and he accepted the honour after singing his hit All of Me.

Thanking his team, wife Chrissy Teigen and the NAACP, he said in an inspirational speech, "We know that we stand on the shoulders of giants who risked their lives to bring us closer to true freedom. And of course, we are still fighting for freedom. I'm hopeful that our generation will demand and achieve radical change in our lifetime.

"Our lives should, indeed, matter just as much as anyone else's. Fighting for justice isn't an act of hate, it's an act of love. So let's spread love, let's make the world a more beautiful and just place. We have so much opportunity, let's not waste it."

Michael B. Jordan collected two awards for his role in boxing drama Creed, including Entertainer of the Year, and O'Shea Jackson, Jr. was awarded the honour of Outstanding Supporting Actor in a Motion Picture for N.W.A biopic Straight Outta Compton.

Idris Elba missed out on a third award for his role in Netflix drama Beasts of No Nation, after previously scooping two gongs at the Screen Actors Guild (SAG) Awards last week, but the movie did win Outstanding Independent Motion Picture during Friday's ceremony.

Anthony Anderson, Tracee Ellis Ross and Marsai Martin all won for their roles in the comedy Black-ish, and Outstanding Drama Series went to Empire, with Terence Howard and Taraji P. Henson winning Outstanding Actor and Actress in a Drama Series for their roles in the popular Lee Daniels-created series.

Echoing the SAG Awards, Queen Latifah did the double by winning Outstanding Actress in a Television Movie, Miniseries or Dramatic Special for her star turn in Bessie.