#8088 machine code, IBM PC DOS, <del> 44 </del> 43 bytes **Listing:** BE 0122 MOV SI, OFFSET CTBL ; load color bar table LOOP_COLOR: B9 0001 MOV CX, 1 ; display 1 char AC LODSB ; load next color byte 8A D8 MOV BL, AL ; move new color to BL 3C 10 CMP AL, 010H ; is last in row (SF=0,CF=0), or last in set (SF=1,CF=0) B8 09DB MOV AX, 09DBH ; AH = 9 (write char with attr), AL = 0DBH (block char) CD 10 INT 10H ; call PC BIOS, write color block B4 03 MOV AH, 3 ; get cursor position function CD 10 INT 10H ; call PC BIOS, get cursor 72 04 JC NEXT_COL ; if not last in row, move to next column 78 09 JS EXIT ; if last char, exit B2 FF MOV DL, -1 ; otherwise move to first column and next row NEXT_COL: 42 INC DX ; move to next column (and/or row) B4 02 MOV AH, 2 ; set cursor position function CD 10 INT 10H ; call PC BIOS, set cursor EB E2 JMP LOOP_COLOR ; loop to next color byte EXIT: C3 RET ; return to DOS CTBL DB 0CH, 0EH, 1DH, 0EH, 0AH, 1BH, 0DH, 0BH, 91H ; color table This uses the IBM PC BIOS `INT 10H` video services to write the color grid to the screen. Unfortunately the only way to write a specific color attribute requires also writing code to place the cursor in the next correct location, so there's a lot of extra code for that. Here's the output running on an IBM PC CGA (in 40x25 text mode to make it bigger). [![enter image description here][1]][1] Download and test [RGBGRID.COM][2] for DOS. [1]: https://i.sstatic.net/Z95ED.png [2]: https://stage.stonedrop.com/ppcg/RGBGRID.COM