Personally, I'd achieve this effect using psuedo-elements. Use ::before
and ::after
for each of the corners, and use their left and top (respectively right and bottom) borders in the colour you want. You can then set their width and height. Be sure to set the "hidden" borders to zero width so that you don't get slanted corners.
If you have a problem implementing this, please feel free to come back with the code you have tried :)