There was no mistaking the message Serena Williams was sending.

Like a sizzling ace, the Nike commercial arrived in the midst of Sunday night’s Academy Awards, and it was an attention-getting reminder of all that Williams has been through, at a time when the film industry and other workplaces have been rocked by the #TimesUp movement and the #MeToo sexual harassment and sexual assault scandals.

The message, coming days ahead of International Women’s Day on Thursday, continues a journey in which Williams has increasingly found her voice, speaking out about social issues like gender and racial inequality. In the Nike spot — titled “Until We All Win” — Williams ticks off all the negatives she has heard over her career, blistering comments that have inspired her rather than hold her back.

“I’ve never been the right kind of woman,” she says in a voice-over. “Oversized and overconfident. Too mean if I don’t smile. Too black for my tennis whites. Too motivated for motherhood. But I am proving, time and time again, there’s no wrong way to be a woman.”

Williams, who returns to the court this week at Indian Wells, acknowledged that she now has “a huge platform” at her fingertips, something that wasn’t on her mind when her career began.

“Over time, I became much more conscious of the impact I had, and I became more conscious of what I had to do to make a difference,” she said in a statement about the new spot (via AdWeek). “I embrace being a leader and continuing to pave the way for the next generation.”

Her hope, she said, is to break down “barriers” to gender and pay equality, something that has long been a problem in tennis.

“It doesn’t happen overnight,” she said in the statement. “It takes a lot of work and I’m going to keep on going and working at it, and I encourage others to use their voice and their platforms to do that same.”

Her awareness, she said, was heightened by the birth of her daughter, Alexis Olympia, in September.

“I want my daughter to be truthful and honest, strong and powerful; to realize that she can impact those around her,” she said in the statement. “I want her to grow up knowing a woman’s voice is extremely powerful. As females, we need to continue to be loud and make sure we are heard.”

A print version of the ad appeared in the New York Times, with these words: “You told a little girl she was too black for tennis whites. And she grew up to be Serena Williams.”

At 35, Williams is increasingly aware that an athletic career that began when she was a child is approaching its end. She’s taking stock of the country’s social and racial landscape, and assessing her own place in it, as well as her potential status as one of sports’ all-time greats.

“I think if I were a man, I would have been in that conversation a long time ago,” Williams said in an interview last year with rapper Common for ESPN’s “The Undefeated.”

“I think being a woman is just a whole new set of problems from society that you have to deal with, as well as being black, so it’s a lot to deal with — and especially lately,” she said then. “I’ve been able to speak up for women’s rights because I think that gets lost in color, or gets lost in cultures. Women make up so much of this world and, yeah, if I were a man, I would have 100 percent been considered the greatest ever a long time ago.”

Williams wrote an open letter in 2016 “to all incredible women who strive for excellence” in which she urged them to “dream big” and concluded:

As we know, women have to break down many barriers on the road to success. One of those barriers is the way we are constantly reminded we are not men, as if it is a flaw. People call me one of the “world’s greatest female athletes.” Do they say LeBron is one of the world’s best male athletes? Is Tiger? Federer? Why not? They are certainly not female. We should never let this go unchallenged. We should always be judged by our achievements, not by our gender.

For everything I’ve achieved in my life, I am profoundly grateful to have experienced the highs and lows that come with success. It is my hope that my story, and yours, will inspire all young women out there to push for greatness and follow their dreams with steadfast resilience. We must continue to dream big, and in doing so, we empower the next generation of women to be just as bold in their pursuits.

“I shouldn’t have to apologize for saying and believing that I could be the best,” Williams said in the ESPN interview. “We took the globe and shook it, me and Venus, because we came from Compton. We came from nothing, and in tennis you kind of have to have something. We came, and we conquered.”

More from The Post:

Kobe Bryant drops ‘shut up and dribble’ reference after winning Oscar for ‘Dear Basketball’

Watch as rescuers dig out a snowboarder from a Squaw Valley avalanche

Capitals sing Navy’s praises, and NHL may add games at service academies

A one-handed linebacker with blazing speed has the NFL combine abuzz

Welcome to the wild, wild West as eight teams compete for six NBA playoff spots