SETCOLOR

Syntax

SETCOLOR number list

Explanation

The color setting for the given color number in the current pallet is changed. This setting is a list of three values between 0 and 255, where the first value stands for red, the second value for green and the third value for blue.

Depending on the graphics card used, the color values are interpreted differently. On an EGA card, only the two most significant bits are interpreted. This makes it possible to create a total of 64 colors. On a VGA ard, the six leftmost bits are interpreted, which gives a total of 262,144 colors. Each pallet holds 255 entries, resulting in valid color numbers between 0 to 255.

The color values are interpreted modulo 256, which means that a color value of 257 is interpreted as 1.

See also COLOR, PENCOLOR, and SETPC.

Example

This example redefines color 15 in the current pallet to a bright green.

? SETCOLOR 15 [0 255 128]

?