It was the midst of the 2016 campaign, and some on President Barack Obama's senior staff were advising him to stay silent on the racial rhetoric of candidate Donald Trump. But Cecilia Muñoz, Obama's domestic policy adviser, was uneasy with that advice and turned to senior Obama adviser Valerie Jarrett.

Jarrett helped Muñoz understand "that I had a perspective to offer to the president's other advisors and that I saw something by virtue of my experience that they might not see," Muñoz writes in her new book, "More Than Ready: Be Strong and Be You ... and Other Lessons for Women of Color on the Rise," out on Tuesday.

"I was finally able to explain that my discomfort was about the fact that Trump's harmful, over-the-top words weren't just offensive on their face; they gave legitimacy to similar hostile and racist feelings held by others, and, as history shows us, often leads to real outcomes that harm actual people," she wrote.

Muñoz, the first Hispanic to serve as director of the White House Domestic Policy Council, knows other women of color contend with similar challenges and do not often have colleagues to turn to, particularly when they are the "first" or "only" person or woman of color in their role.

Jacket of new book authored by Cecilia Munoz, who served as White House Domestic Policy Council director under President Barack Obama. Seal Press

She shares her struggles with fear, hesitation and self-doubt, much of it experienced over her eight years in the Obama White House. She describes how she and seven other women of color she interviewed for the book navigated and overcame their challenges to survive and thrive in worlds often dominated by white men.

"I did not come out of the White House thinking I wanted to write a book at all — I did what women do, saying, 'What would I have to say that would be of value to anybody?'" Muñoz said in an interview, adding that other women persuaded her she had much to offer.

"For me [writing the book] was an exercise in actually taking some of the advice that I've given other women — that is, to accept that what you bring to the table is really important," she said.

'It's time'

Muñoz's insistence that it's past time for women of color to be hired, appointed and elected to major positions of power and leadership is the meaning of the book's title, she said.

Women of color are more than ready to be in those positions, including vice president, she said.

"The notion that we are still in the generation of people who are the first in their roles — I was the first Hispanic person to be domestic policy director. Only in the last decade have we had the first Supreme Court justice [Sonia Sotomayor]. The first Latina elected to Congress [Rep. Ileana Ros-Lehtinen, R-Fla.] just retired," Muñoz said. "It's time."

"We are all playing mind games with ourselves," Muñoz said."Would we be OK if there was a woman flying my airplane? Would we be OK if there was a woman leading our country? Well, if it's the right woman, yes, of course. Part of how we get there is for women like us to first persuade ourselves that we are ready."

'Help me change the country'

Muñoz arrived at the White House after a couple of decades as an immigrant advocate and policy expert with the National Council of La Raza, a Latino advocacy organization, which now goes by the name UnidosUS. When she was pregnant with her first child at La Raza, she took the opportunity to negotiate for the organization's first paid leave policy for men and women.

Her parents emigrated from Bolivia to the Detroit area, where she grew up with few other Latino families around her except other family members. She became one of Washington's leading experts on immigration policy, being awarded a MacArthur Foundation "genius grant" for her work on immigration and civil rights in 2000.

Muñoz said she stumbled into immigration policy by volunteering for an immigration lawyer in the Fruitvale area of Oakland, California, while she was in graduate school

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

In her first job, with Catholic Charities in Chicago, her questions to her boss about how the office was going to help immigrants get legal status under the new 1986 immigration reform law led to her being put in charge of the organization's legalization program. She was 24.

Muñoz had initially turned down the offer of her first White House job, as director of intergovernmental affairs, because of her two young children, she wrote in her book.

But the next day, Obama was on the phone with her, promising to make the White House a family-friendly workplace. "I want you to help me change the country. Hillary couldn't say 'no' to me and neither can you," Obama told her. "I will call your husband. I will call your children. I will come to your house; I will make this embarrassing for you; I won't take no for an answer."

Despite her credentials, she reveals in the book that she contended with her own bouts of imposter syndrome. She writes that it was clear that a small number of colleagues thought she owed her position to her ethnicity "and didn't take seriously what I brought to the job."

She names Bill Daley, Obama's chief of staff, as one those colleagues. Muñoz had collaborated with Melody Barnes, the first White House director of the Domestic Policy Council, and she sought the job when Barnes left. She wrote that she learned after Daley left the White House that he had conveyed to a couple of journalists who were writing books that he was angry when Muñoz got the job.

"If I were to name the people who I wished would have taken me more seriously, and who I feared saw me as the Latina who 'was there for diversity' ... Bill would be high on that list," she wrote. "Under his leadership, I had to fight more than usual to be included in meetings that directly related to my job."

Daley told NBC News that he was surprised and disappointed Muñoz that feels that way. He said Muñoz was the obvious inside choice for the job but that "I thought when that vacancy occurred the president should look at a much broader group of people, and he did, and he chose Cecilia."

Muñoz does credit Daley in the book with having told her to ignore media criticism questioning her Latina identity because of the administration's immigration deportation policies.

On coronavirus, 'they are not' keeping us safe

Muñoz bluntly acknowledges that she felt "profoundly fearful" at the beginning of her time in the White House.

The Obama administration began in the midst of an epic financial crisis, thousands of job losses and the H1N1 flu pandemic, even as Cabinet members still were being confirmed in the Senate.

In the book, Muñoz recalls the "deeply terrifying analysis" delivered by the national security team of what might happen if the H1N1 virus mutated and a vaccine was not quickly designed.

Today, she feels fear again as the cases of the coronavirus — and the deaths, including that of her cousin's husband — mount while the Trump administration struggles to get medical equipment to hospitals and some states refuse to issue stay-at-home orders to slow the spread of the virus.

Muñoz said that she recalls, during the transition after Trump was elected, sitting next to Trump senior adviser Stephen Miller during the disaster exercise to walk members of the incoming administration through preparations for disasters the Obama administration had faced — a pandemic, a cyberattack and a major hurricane.

During the exercise, "he was on the phone," Muñoz said of Miller.

Download the NBC News app for breaking news and politics

Muñoz said that when the first coronavirus cases hit in January, the administration should have ramped up testing as well as manufacturing of additional necessary equipment, and isolated those who are sick. "If you do that successfully, you don't have to shut down an economy," she said.

"No matter whether or not you agree with them on politics and policy," Muñoz said about the current administration, "you want them to be successful in keeping the American people safe, and we're living with their failure to do that. I want them to pay attention. I want them to follow the science. I want them to succeed in keeping us safe, and they are not."

My advisor and friend @cecmunoz has been someone I’ve turned to for years. In her new book, More Than Ready, she shares her story and an empowering message to women, especially women of color, that they are the leaders we need to make a change in our world. pic.twitter.com/6bQski6N23 — Barack Obama (@BarackObama) April 7, 2020

Blowback from record deportations

To many in the Latino and immigrant activist community, Muñoz was the face of Obama's immigration enforcement policies, which led to a record number of deportations. She addresses the media attacks and criticism from her own community in a few pages in a chapter titled "Daring to Be Disliked."

She describes seeking feedback from Pramila Jayapal, now a Democratic House member from Washington state and then leader of the advocacy group One America, and from Ai-jen Poo, who runs the National Domestic Workers Alliance.

The women were highly and publicly critical of the administration's immigration enforcement, but Muñoz also described them as advocates who "were looking for answers and policy changes more than they were looking to call people names."

Muñoz took the two women up on a request to meet with immigrant families who explained how the Obama deportations were affecting their lives. The feedback "contributed mightily to the more thoughtful set of priorities for immigrant enforcement that we ultimately developed," Muñoz wrote in her book. The administration created the Deferred Action for Childhood Arrivals (DACA) program, allowing young immigrants without legal status to work and study without fear of deportation.

Muñoz lets readers in on other tidbits, such as how she learned to start swearing to dispel perceptions of her based on her height — 5 feet, 2 inches — and to convey toughness.

She also cites several men who served as early career coaches, including Raul Yzaguirre, the former president and CEO of the National Council of La Raza, and Charles Kamasaki, her direct supervisor at La Raza. She credits her husband, the human rights lawyer Amit Pandya, for taking up a large share of the responsibility for their children and home while she worked in the White House.

Muñoz said she had to think a lot about whether it was OK to admit her weaknesses and struggles and "say it out loud," but she said she realized that all the women she interviewed — "some pretty bad-ass women" — had similar paths.

Her plans for a book tour have been scratched because of the outbreak. Her book will debut at an online cocktail party staged by New America, where Muñoz is vice president of public interest technology and local initiatives.

"What I'm hoping for is that women will see themselves," she said, "and understand themselves as women who can take flight."

Follow NBC Latino on Facebook, Twitter and Instagram.