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.
Predefinded colours for the later maximite family are:
WHITE RGB(255, 255, 255) YELLOW RGB(255, 255, 0) LILAC RGB(255, 128, 255) BROWN RGB(255, 128, 0) FUCHSIA RGB(255, 64, 255) RUST RGB(255, 64, 0) MAGENTA RGB(255, 0, 255) RED RGB(255, 0, 0) CYAN RGB(0, 255, 255) GREEN RGB(0, 255, 0) CERULEAN RGB(0, 128, 255) MIDGREEN RGB(0, 128, 0) COBALT RGB(0, 64, 255) MYRTLE RGB(0, 64, 0) BLUE RGB(0, 0, 255) BLACK RGB(0, 0, 0) BROWN RGB(255, 128, 0) GRAY RGB(128, 128, 128) LITEGRAY RGB(210, 210, 210) ORANGE RGB(255, 165, 0) PINK RGB(255, 160, 171) GOLD RGB(255, 215, 0) SALMON RGB(250, 128, 114) BEIGE RGB(245, 245, 220)
Last edited: 03 August, 2022