Graphics Function: Gets the current background color index for both text and graphics output.
Module: USE DFLIB
Syntax
Results:
The result is of type INTEGER(4). The result is the current background color index.
GETBKCOLOR returns the current background color index for both text and graphics, as set with SETBKCOLOR. The color index of text over the background color is set with SETTEXTCOLOR and returned with GETTEXTCOLOR. The color index of graphics over the background color is set with SETCOLOR and returned with GETCOLOR. These non-RGB color functions use color indexes, not true color values, and limit the user to colors in the palette, at most 256. For access to all system colors, use SETBKCOLORRGB, SETCOLORRGB, and SETTEXTCOLORRGB.
Generally, INTEGER(4) color arguments refer to color values and INTEGER(2) color arguments refer to color indexes. The two exceptions are GETBKCOLOR and SETBKCOLOR. The default background index is 0, which is associated with black unless the user remaps the palette with REMAPPALETTERGB.
Compatibility
STANDARD GRAPHICS QUICKWIN GRAPHICS LIB
See Also: GETBKCOLORRGB, SETBKCOLOR, GETCOLOR, GETTEXTCOLOR, REMAPALLPALETTERGB, REMAPPALETTERGB
Example
USE DFLIB
INTEGER(4) bcindex
bcindex = GETBKCOLOR()