The timing couldn’t have been more painful.

Over the Martin Luther King holiday weekend, Scholastic announced that it would cease selling a picture book called “A Birthday Cake for George Washington” because of its superficial depiction of slavery.

The book, written by Ramin Ganeshram and illustrated by Vanessa Brantley-Newton, was published on Jan. 5 for children 7 to 10 years old. It describes Hercules, Washington’s enslaved chef, and his young daughter Delia. In Ganeshram’s story, Hercules has to bake a cake for Washington, but he doesn’t have any sugar on hand. All are thrilled when that challenge is overcome and the cake is a success.

Only in an afterword for parents and teachers does Ganeshram mention that Hercules eventually managed to escape.

The book received a particularly damning advance review from School Library Journal, a trade magazine that influences many library and bookstore purchases. “Young readers without sufficient background knowledge about the larger context of American slavery may come away with a dangerously rosy impression of the relationship between slaves and slave owners,” the reviewer said, “and those with a deeper understanding are likely to find this depiction offensive.”

A few days after the book was released, readers took the author, the illustrator and the publisher to task online for presenting a sanitized version of the life of Washington’s cook and other enslaved people. “An insulting tale that sprinkles glitter on rape, murder, torture and servitude,” wrote one outraged reviewer.

Scholastic held its ground for a few days and even issued a statement acknowledging that “A Birthday Cake for George Washington” had “generated an important discussion about the depiction of slavery in children’s books.” The publisher directed readers to comments by Ganeshram and Scholastic editor Andrea Davis Pinkney in which they explained their views on the book.

But two days later, on Jan. 17, Scholastic reversed itself and announced that distribution of the book would stop immediately: “While we have great respect for the integrity and scholarship of the author, illustrator, and editor, we believe that, without more historical background on the evils of slavery than this book for younger children can provide, the book may give a false impression of the reality of the lives of slaves and therefore should be withdrawn.”

The statement went on to say, “We do not believe this title meets the standards of appropriate presentation of information to younger children, despite the positive intentions and beliefs of the author, editor, and illustrator.”

This is the kind of complex controversy that plays loudly on Twitter, but has no real villains. The parties involved are not clueless people trampling on history and sensitivities they don’t understand. Executive editor Pinkney and illustrator Brantley-Newton are both African Americans. Pinkney is a Coretta Scott King Award winner and the founder of a major imprint for African American children’s books. Brantley-Newton has illustated more than a dozen books, including “We Shall Overcome: The Story of a Song.”

Ganeshram is an American journalist, with a Trinidadian father and an Iranian mother, who has written widely on food and the culture of food. She spent more than three years researching the life of Hercules and consulting with historians at the President’s House in Philadelphia, where her story is set. She was, she writes, determined to demonstrate “the range of Chef Hercules’ skill and brilliance.” In response to her critics, she states, “We must be mindful that we don’t judge historical figures by modern viewpoints. . . . It is the historical record — not my opinion — that shows that enslaved people who received ‘status’ positions were proud of these positions.”

It’s possible, though not encouraged by our screaming online culture, to raise serious objections to this book without calling into question the motives or talents of the people involved. Jabari Asim, editor of the Crisis, the official magazine of the NAACP, wrote via email that “few editors or publishers have produced as many high-quality children’s books about African Americans as Andrea Pinkney at Scholastic.”

Asim, who teaches at Emerson College in Boston, didn’t have a chance to see “A Birthday Cake for George Washington” before it was withdrawn, but he pointed to the challenge of presenting this grim history to young people. “I’m also sensitive to the difficulty of writing children’s books about slavery, having written one myself (‘The Road to Freedom’). I had many back-and-forths with my editor, who consistently challenged me about the harsh scenes that I chose to include. I think the challenges were helpful because you want to convey the reality of captivity; you absolutely do not want to sugar-coat it. At the same time, you don’t want to leave young readers so discouraged that they close the book.”

He went on to note, “As an author, reader and — especially— parent, I’m most interested in Hercules’ daring escape from Washington’s oppression. That’s a far more valuable and compelling story.”

He suggested teachers and parents seek out “Ellen’s Broom” and “Hope’s Gift,” by Kelly Starling Lyons; “Christmas in the Big House, Christmas in the Quarters,” by Patricia and Fredrick McKissack; and “All Us Come Cross the Water,” by Lucille Clifton.

A Birthday Cake for George Washington

By Ramin Ganeshram

Illustrated by Vanessa Brantley-Newton

Scholastic. 32 pp. Ages 7-10