# COLOUR COLOR

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
COLOUR fore [, back]
COLOR fore [, back]

COLOUR fc, bc (DOS)

Description:
Sets the default colour for commands (PRINT, etc) that display on the on the VGA monitor.

'fore' is the foreground colour,
back' is the background colour. The background is optional and if not specified will default to black.

colour rgb(red), RGB(255, 192, 203)
print "this is in RED on a pink background"

COLOUR fc, bc (DOS only)
Sets the colours for subsequent characters written to the console window.
'fc' is the foreground colour and 'bg' is the background colour. These values
can be any one of the following:
0 = Black 8 = Gray
1 = Blue 9 = Bright Blue
2 = Green 10 = Bright Green
3 = Cyan 11 = Bright Cyan
4 = Red 12 = Bright Red
5 = Purple 13 = Bright Purple
6 = Yellow 14 = Bright Yellow
7 = White 15 = Bright White
This command can also be spelt as COLOR.

The Colour Maximite Ver1 supports eight colours (black, blue, green, cyan, red, purple, yellow and white).
The monochrome Maximite or DuinoMite support just two (black and white). In most places you can also specify the colour as -1 to invert a pixel (this is useful in animation).
Throughout MMBasic you can refer to the colours by their name or their corresponding numbers where black = 0, blue = 1, green = 2, etc through to white = 7.
Commands such as LINE and CIRCLE use this colour or number to specify the colour to draw.
For example:
CIRCLE (100, 100), 50, CYAN will draw a circle in cyan.
CIRCLE (100, 100), 50, 3 will also draw a circle in cyan (colour = 3).
You can also specify a default colour that will be used for all screen output with the COLOUR command.
For example: COLOUR PURPLE will set the colour of text to purple (and any other output where the colour is not specified).
The COLOUR command also takes a second parameter for the background colour. So, COLOUR YELLOW, BLUE specifies that text will be displayed in yellow on a blue background.

Last edited: 12 October, 2020