... così ?

codice:
nome_tabella.firstChild.childNodes[i].getAttribute("background-color");