I think the COLOR command should be extended to be able to set the border color:
https://github.com/X16Community/x16-doc ... C.md#color
Now you can set the border color using e.g. POKE $9F2C, $BC if you have e.g. set VIC20 screen mode using SCREEN 7.
I think the foreground and background colors should still be set using PETSCII/X16 control codes as is done now, but the border color doesn't have a control code so it would have to be set using an instruction corresponding to POKE in 65C02 assembly, unless of course some way to do it using control codes is invented.