To be more accurate, the country elected a "half black/half white" president. No doubt some voted for the white half and chose to ignore the other half( and vise versa ). Had he been "100%" black, would he have passed muster to even be a serious candidate? Probably not. 
It's also unlikely he would have won his totally ill-deserved peace prize if he didn't have the "half black" component. Some people do put way too much into that skin color thing.