If you only want to change the top border, then you need to do a couple of things:
1) Go into the Border tab of the field and set the Edges to be "Edit Individually"
2) Change one border to be different from the others (doesn't matter which one, but probably the top one).
This will force Designer to generate separate <edge> tags within the <border> tag. You can verify this by going into the XML Source tab and viewing the field. Before you make that change there will be one <edge> tag under <border> and afterwards, there will be 4 separate tags (one for each edges of the field's border - top, right, bottom, and left).
Once that's done, then the following line should work:
this.resolveNode("border.edge[0].color").value = "0,0,255"; // Set line to blue
What this is doing, is setting the first border.edge element's color child to have a value of 0,0,255. You need to do the resolveNode() call because JavaScript interprets the square brackets as an array reference. The resolveNode, passes the square brackets to the SOM expression engine which correctly interprets it as meaning the index number of a multiply occurring element.
You can replace edge[0] with edge[1], edge[2] or edge[3] for the other borders.