Contents |
Effect
Changes the color(s) to be used for the foreground, background and border.
Notes:
- It can be useful to choose your screen and its colors in MSX-BASIC before going to the MSX-DOS environment - for more info, see the MSX-BASIC instructions SCREEN, CALL KANJI and COLOR.
- The palette of colors 0 to 15 can be altered on MSX2 and higher with the MSX-BASIC COLOR= and CALL PALETTE instructions: if that is the case you can change or restore the palette with these instructions before switching to the MSX-DOS environment, or use the external command PALETTE in DOS.
Syntaxes
- COLOR <ForegroundColor> <BackgroundColor> <BorderColor>
- COLOR <ForegroundColor>,<BackgroundColor>,<BorderColor>
The first parameter needs always to be specified. Contrary to the MSX-BASIC COLOR instruction, it's not possible to 'skip' a color by using just a comma.
Parameters can not end with a comma alone (when you use the second syntax),
Parameters
<ForegroundColor> is the color used for the text on screen 0, 1, 9 or in the KANJI text modes.
<BackgroundColor> is the color used for the background on screen 0, 1 or 9. This color is used differently in the KANJI text modes (see below).
<BorderColor> is the color used for the borders (top, bottom, left, right) of the screen. There are no borders in screen 0 or when the width of the screen is higher than 32 - see the MODE command.
For each color, you must specify a number between 0 and 15.
Remarks about using of COLOR when you are in a Kanji text mode:
- the text displayed before the execution of COLOR does not switch to the new color specified as <ForegroundColor>
- the background color displayed before the execution of COLOR does not change when specifying a new <BackgroundColor>, only the background of the new texts are changed, but the new color is also applied to he border color. Besides, the cursor will be displayed in another color, different from the foreground color, and that will vary depending on the general background color.
- if you specify a new <BorderColor>, it will not have effect.
- To change the general background color, you need to use COLOR with <ForegroundColor> and <BackgroundColor>, then CLS.
Examples
A>COLOR 10
A>COLOR 4 1
Related to
Compatibility
MSX-DOS 2 / Nextor with COMMAND2.COM v2.40 and higher