Apple CEO Tim Cook says President Trump's response to the violence at a white supremacist rally in Charlottesville contradicts American values.

In an email to Apple (AAPL) employees on Wednesday night, Cook called for an "unequivocal" denouncement of hate and bigotry, rejecting Trump's widely criticized remarks on Charlottesville.

"I disagree with the president and others who believe that there is a moral equivalence between white supremacists and Nazis, and those who oppose them by standing up for human rights," Cook wrote. "Equating the two runs counter to our ideals as Americans."

Related: Trump's business panels collapse after president's remarks on Charlottesville

He announced Apple would donate $1 million each to the Southern Poverty Law Center and the Anti-Defamation League, describing them as groups working "to rid our country of hate."

And for every dollar that Apple employees donate to certain human rights groups through the end of September, the company will donate $2. Customers will also soon be able to use iTunes to support the Southern Poverty Law Center.

Cook's comments come after top CEOs abandoned Trump in the wake of his remarks on Charlottesville, leading to the collapse of the president's two business advisory groups. Cook had previously participated in a couple tech summits hosted by Trump.

The president's relationship with Silicon Valley has been tense from the start, marked by clashes over Trump's travel ban, the rollback of protections for transgender students and the decision to withdraw from the Paris climate accord.

Related: How Corporate America responded to the violence in Charlottesville

Some tech companies have responded to the Charlottesville violence by cracking down on neo-Nazi sites and hate groups.

Cook acknowledged that "these have been dark days," urging Apple employees to "all stand together on this one point — that we are all equal."

"What occurred in Charlottesville has no place in our country," he said. "Hate is a cancer, and left unchecked it destroys everything in its path."

-- Rob Mclean contributed to this report.