There's no evidence at all Obama was elected because of the color of his skin. There have been quite a few black people who have run for the presidency, and before Obama, every single one of them put up a truly abysmal showing. Alan Keyes, for example, was a laughing stock. Herman Cain didn't win a single primary. Carol Mosley Braun and Al Sharpton made barely a ripple. Jesse Jackson's showing was the only one before Obama that was marginally respectable, and he was never really in the running. Never before Obama did Americans show any desire to elect a black man president because of the color of his skin. In fact, in the very long history of American democracy, no black person had EVER come anywhere close to winning a major party presidential nomination, much less the presidency. It was an unbroken line of white people going all the way back to George Washington. And blacks were also under-represented in governorships, the House, and the Senate... and remain so today. In fact, very few blacks have served in major elected office of any sort, outside of mayoral positions. Most of the black people who've been significant political figures have been appointees, where they never had to compete for votes in a white-favoring electorate.
It takes a special sort of racist to look at that history and imagine that somehow Obama rode his race to the presidency.
The reason Obama won has a little to do with his personal charisma, intelligence, and message. And it has a whole lot to do with the fact Bush got his way and it led to an unprecedented, across-the-board national disaster, and neither Mitt Romney nor John McCain could articulate how their policies would differ from Bush's. As polls showed in early 2008, if Hillary Clinton had won the Democratic primary (as she very nearly did), she'd have beaten the snot out of McCain, too. The vote for Obama was mostly a vote against the Republicans, and race made very little difference. If you want more evidence, look at Obama's dominating performance among racial minorities who had no candidate in that election: Hispanics, Asians, Native Americans, and Arabs, for example. For them, they weren't able to vote for one of their own, nor was there any "white guilt" to drive their vote, yet they backed Obama by gigantic majorities. The only major group that didn't back him that way were whites, who preferred the white options in 2008 and 2012.