If somebody did vote for Obama because he was black, they are not going own up to it, in fact they may not even know that is the reason why they did it. This reminds me of the Indian election, the situation is similar.
Sonia Ghandi, an italian born national who had been living in India for decades as part of the Ghandi family, was running for PM. The opposition highlighted the race factor for their campaign and pretty much slandered her(kind of like calling Obama a terrorist) the public were not very happy with what was going on, so Sonia Ghandi ended up winning a landslide victory. (She ended up not taking the post in the end, but the public had officially voted her in)
In situations like these one can become so disgusted with one of the parties and their victimization of the other, which is what happened in India. It is called sympathy vote, routing for the underdog.
This is not to say that Obama had no other merits. I am sure those who are more politically aware made an informed decision on electing him, but the masses usually react emotionally, not rationally.
It is really good to see a black president though and much better to see a non-neo con party in power. But as I said earlier I am not convinced that it is going to make a substantial difference. It remains to be seen really.