COLOR (KvB)
This page was last modified 09:50, 22 April 2022 by Gdx. Based on work by Mars2000you.

Contents

Description

It's an MSX-DOS 1 tool created by K. van Buul. You can find it on Future Magazine 3.

Notes:

  • This tool is not compatible with Korean machines.
  • You can use it under MSX-DOS 2 but only with versions of COMMAND2.COM 2.2x and 2.3x (the internal command COLOR is automatically used with COMMAND2.COM 2.4x).

Command

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.

Syntax

COLOR <ForegroundColor>,<BackgroundColor>,<BorderColor>

Note: As with the MSX-BASIC COLOR instruction, it's possible to 'skip' a color by using just a comma. Each parameter is optional except the last specified. Do not put a comma after this parameter.

Parameters

<ForegroundColor> is the color used for the text on screen 0, 1 or in the KANJI text modes.

<BackgroundColor> is the color used for the background on screen 0 or 1. 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. As with the MSX-BASIC COLOR instruction, it's possible to 'skip' a color by using just a comma.

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 seems to have not effect but the new color will be taken in account when returning to another screen mode in MSX-BASIC.
  • To change the general background color, you need to enter COLOR,<BackgroundColor> then use the MSX-DOS 1 tool CLS or the internal MSX-DOS 2 command CLS.

Examples

A>COLOR 1,13,5
A>COLOR 10
A>COLOR 1,13,5
A>COLOR ,,13

Related to

CLS (MSX-DOS 1 tool), CLS (MSX-DOS 2 internal command), COLOR (GDX version), KMODE, MODE

Environment

  • MSX1 and higher (except Korean machines)
  • MSX-DOS 1 / MSX-DOS 2 with COMMAND2.COM 2.2x or 2.3x