The opening musical number of the Oscars on Sunday had all the glitz and glam associated with the biggest night in Hollywood: the singer-songwriter Janelle Monáe in a tuxedo top, a large cast of backup dancers and sparks flying from the back of the stage.

It was also unusually self-aware. Some dancers’ costumes referenced films that had been snubbed in the Academy Award nominations, and there were clear references to the lack of diversity among the contenders.

Monáe made a pointed comment about female filmmakers, who were noticeably absent from the best director category. “We celebrate all the women who directed phenomenal films,” said the performer, draped in a shawl fashioned from a bright assortment of flowers and wearing a flower crown, a reference to the horror film “Midsommar,” which wasn’t nominated.