Octavia Spencer is on board to co-star opposite Taraji P. Henson in Fox 2000’s “Hidden Figures.”

The studio has been developing the adaptation of Margot Lee Shetterly’s book “Hidden Figures: The Story of the African-American Women Who Helped Win the Space Race,” published by HarperCollins.

“St. Vincent” director Ted Melfi is attached to direct and produce the film along with Chernin Entertainment and Donna Gigliotti of Levantine Films.

The story centers on Johnson (Henson), a brilliant African-American mathematician who, along with her colleagues Dorothy Vaughn and Mary Jackson, served as the brains behind one of the greatest operations in U.S. history — the momentous launch of astronaut John Glenn into orbit, and his safe return. The three women crossed all gender, race and professional lines while embarking on the mission. Spencer will play one of the three mathematicians.

Glenn flew the Friendship 7 mission in 1962 and became the first American to orbit the Earth.

The book will be published in September from HarperCollins.

Spencer is on board to reprise her role in “The Divergent Series: Allegiant” and is also set to play God in “The Shack,” which bows later this year. She also recently filmed Marc Webb’s “Gifted” opposite Chris Evans.

She is repped by WME and attorney Karl Austen.