Hillary won California 5,860,714 to Trump’s 3,151,821. 61.6% to 33.1% exclusive of the other candidates.
But deduct her California vote from her national vote leaving her with 54,978,783, and deduct Trump’s California vote from his national total, leaving him with 57,113.976, he wins in a landslide in the other 49 states, 51.3% to her 48.7%.
So, in effect, Hillary was elected president of California and Trump was elected president of the rest of the country by a substantial margin.