Not always--a getBorderBeforeColor() for a table cell will need to take into account what was declared for any row, column, and possibly table-edge that the its before edge shares.
The border conflict resolution algorithm is described in the CSS2 spec, see http://www.w3.org/TR/REC-CSS2/tables.html#borders and especially http://www.w3.org/TR/REC-CSS2/tables.html#border-conflict-resolution
However, background images and placement and some other stuff should be fairly simple compared to table borders.
J.Pietschmann