The Oscar nominations are a little blacker this year.

Actually, a lot blacker, considering how white the acting categories were last year. This time around, three out of the five Best Supporting Actress nominees are black, including Octavia Spencer for her role in “Hidden Figures,” a film based on the real story of black women mathematicians at NASA who helped America send its first man into orbit in the early ’60s. The movie is also up for Best Picture and Best Writing Adapted Screenplay.

It’s just a shame the story got so whitewashed.

One of the storylines in “Hidden Figures” centers around a bathroom. Math genius Katherine Johnson, played by Taraji P. Henson, is transferred to a new building, where there are no bathrooms for black women. So every time she needs to relieve herself, she has to run across the campus to a building with a “Colored” bathroom.

Her white boss, played by Kevin Costner, discovers this only when Johnson returns to her desk from a bathroom break, drenched after running for half an hour in the rain. He is aghast, apparently having been unaware racism was taking place under his nose. So he picks up a crowbar, heads to the bathroom, and smashes the Colored Ladies Room sign. Then, as a crowd of black women look on, he delivers a powerful, funny rejection of Jim Crow segregation: “No more colored restrooms. No more white restrooms…. Here at NASA, we all pee the same color.”

It’s a brilliant, dramatic scene. It also never happened.

The film is based on a book written by Margot Lee Shetterly, which is itself based on interviews with the actual black women who worked at the Langley Research Center. The book states very clearly that Johnson “refused to so much as enter the Colored bathrooms,” and that nobody ever tried to make her do so.

To confirm this, I asked Johnson if she used the Colored bathrooms. “I just went on in the white one,” she said.

I then asked the film’s director, Theodore Melfi, why he had chosen to include a scene that never happened, and whether he thought portraying Johnson as being saved by a benevolent white character diminished what she did in real life.

He said he didn’t see a problem with adding a white hero into the story.

“There needs to be white people who do the right thing, there needs to be black people who do the right thing,” Melfi said. “And someone does the right thing. And so who cares who does the right thing, as long as the right thing is achieved?”

Incidentally, there’s another heartwarming scene that is also fiction. In the film, Johnson finishes some last-minute calculations that allow for the historic launch to proceed. She delivers them to Mission Control, but is not allowed to enter — presumably because she’s a black woman — until Costner’s character appears and ushers her in. She, the lone black woman in a sea of white men, is then allowed to watch the historic flight. Cue a series of traded glances between benevolent white boss and thankful black employee.

Again, this was fabricated to make the white hero look good.

Johnson told me she was at her desk when the launch took place; she was not allowed into Mission Control. The book confirms this: She “sat tight in the office, watching the transmission on a television.”

There’s no need for “Hidden Figures” to follow the true-life story to the letter — it’s not a documentary. But if the raw material is so powerful and interesting, why did the writers need to add a white guy who “does the right thing”?

The answer to that question is pretty obvious. Black people wouldn’t be bothered by a movie that shows white characters who are oppressive at worst and aloof and unhelpful at best, anymore than women would be bothered by the male characters in “Stepford Wives.” So this kind of alteration only serves to soothe the conscience of white people.

That’s the purpose of the White Savior trope — to provide a white character that allows white viewers to feel good about themselves. In this case, it means that a white person doesn’t have to think about the possibility that, were they around back in the 1960s South, they might have been one of the bad ones.

Or the possibility that in 50 years, when someone makes a movie about 2017 America, that their own behavior will qualify them as one of the bad ones.

Maybe white Americans are too fragile to have handled the unadulterated truth about the racist history of the space program. Maybe they would have left the theater in outrage in the face of the fact that black women had to (and were able to) fight for their own rights on their own terms because no white people were swooping in to save them.

Or maybe they would have been just fine, and even appreciated the truth. Maybe the (still mostly white) Academy would have nominated the movie anyway.