Printing colored text on an inkjet.

The procedure for printing colored text on an inkjet is the same as setting underline mode on a dot matrix printer. You send the printer an ESCape code of the color to use, and then just send the text.

Send ESC 'r' n
where n is:
0-Black
1-Magenta
2-Cyan
3-Blue
4-Yellow
5-Red
6-Green

'To print Blue text in QB45:
LPRINT CHR$(27)+"r"+CHR$(3)
LPRINT "This text should be BLUE"

LPRINT CHR$(27)+"r"+CHR$(0)  '  Don't forget to set the color back to BLACK
                             'or do the following
LPRINT CHR$(27)+"@"          '  Resets the printer (and the color to black)

As of now, that is all of the colors I know how to print. I am using a Canon BJC-4300.