If you're looking to highlight individual lines in different colors, consider using a gradient effect for your design. Check out this JSFiddle example.
gradient(linear, 0 0, 0 100%, from(black), to(rgba(0, 0, 0, 0))) 1 100%;
.border-test {
height: 100px;
width: 100px;
border-width: 3px;
border-style: solid;
-webkit-border-image: -webkit-gradient(linear, 0 0, 0 100%, from(black), to(rgba(0, 0, 0, 0))) 1 100%;
-webkit-border-image: -webkit-linear-gradient(black, rgba(0, 0, 0, 0)) 1 100%;
-moz-border-image: -moz-linear-gradient(black, rgba(0, 0, 0, 0)) 1 100%;
-o-border-image: -o-linear-gradient(black, rgba(0, 0, 0, 0)) 1 100%;
border-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0)) 1 100%;
}
<div class="border-test"></div>
If you only want to colorize the edges, refer to the code snippets above.
For a more defined edge, I recommend using a gradient generator tool.