The parameters, and the line trick
The form is ^GBw,h,t,c,r: width, height, border thickness, colour and corner rounding. The ^FO before it decides where the top-left corner sits, as with any field.
A line is the same command with one side zeroed: ^GB420,0,3 draws a 420-dot horizontal rule 3 dots thick, and ^GB0,300,3 draws a vertical one. There is no separate line command — this is the idiomatic form.
- w — width in dots.
- h — height in dots. Zero on either one makes a line.
- t — border thickness in dots. Defaults to 1.
- c — colour: B for black or W for white.
- r — corner rounding, 0 to 8.
Why the box came out solid black
When the border thickness reaches the size of the box, the rectangle fills. ^GB300,80,80 is a 300-by-80 box with an 80-dot border — which is to say, a solid banner. That is not a bug; it is how a filled block is made in ZPL.
If you wanted just the frame and got a solid block, the third parameter is too large. A thickness of 3 to 5 dots is normal for a visible frame on a label at 203 dpi.