|
Gets and sets the RGB value used when displaying color text
attributes.
Syntax
object.ColorMap(Index) [= color ]
Remarks
The ColorMap property array provides access to the virtual
display color table which determines what RGB values are used to
display foreground and background text color attributes.
When the emulator processes an escape sequence that changes the
current foreground or background color, the actual RGB color value is
determined by looking up the value in the virtual display's color
table. The ColorMap property is useful for determining what
values are being used when a color attribute is set and enables an
application to change those colors. The emulator currently supports a
maximum of sixteen (16) color values, and the index into the table
corresponds to the color as defined by the standard for ANSI
terminals:
Index |
Color |
Default (Hex) |
Default (Integer) |
Default (RGB) |
Black |
RGB(0,0,0) |
Red |
000000A0h |
RGB(160,0,0) |
Green |
0000A000h |
RGB(0,160,0) |
Yellow |
0000A0A0h |
RGB(160,160,0) |
Blue |
00A00000h |
RGB(0,0,160) |
Magenta |
00A000A0h |
RGB(160,0,160) |
Cyan |
00A0A000h |
RGB(0,160,160) |
White |
00E0E0E0h |
RGB(224,224,224) |
Gray |
00C0C0C0h |
RGB(192,192,192) |
Light Red |
008080FFh |
RGB(255,128,128) |
Light Green |
0090EE90h |
RGB(144,238,144) |
Light Yellow |
00C0FFFFh |
RGB(255,255,192) |
Light Blue |
00E6D8ADh |
RGB(173,216,230) |
Light Magenta |
00FFC0FFh |
RGB(255,192,255) |
Light Cyan |
00FFFFE0h |
RGB(224,255,255) |
High White |
00FFFFFFh |
RGB(255,255,255) |
A standard ANSI color terminal supports eight standard colors
(0-7). To select a foreground color, you add 30 to the color index
and pass that value as a parameter to the SGR (select graphic
rendition) escape sequence. To select a background color, you add
40 to the color index. For example, to set the current foreground
color to white and the background color to blue, you could send the
following escape sequence:
ESC [ 37;44 m
Note that if you wanted to set the foreground color to a bold
version of standard yellow, you would first set the bold attribute,
and then use the index value of 3, such as:
ESC [ 1;33m
Changing the value of the ColorMap property array allows
the application to make selective changes to the actual RGB color
value that is used when a color attribute is set. Note that changes
to the color map will only affect new characters as they are
displayed, not any previously displayed characters.
Data Type
Integer (Int32)
See Also
BackColor Property,
BoldColor Property, Cell
Property, ForeColor Property
|
|