GETTEXTCOLOR

Graphics Function: Gets the current text color index.

Module: USE DFLIB

Syntax

result = GETTEXTCOLOR( )

Results:

The result is of type INTEGER(2). It is the current text color index.

GETTEXTCOLOR returns the text color index set by SETTEXTCOLOR. SETTEXTCOLOR affects text output with OUTTEXT, WRITE, and PRINT. The background color index is set with SETBKCOLOR and returned with GETBKCOLOR. 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. To access all system colors, use SETTEXTCOLORRGB, SETBKCOLORRGB, and SETCOLORRGB.

The default text color index is 15, which is associated with white unless the user remaps the palette.


Note: The GETTEXTCOLOR routine described here is a QuickWin routine. If you are trying to use the Win32 SDK version of the GetTextColor routine by including the DFWIN module, you need to specify the routine name as MSFWIN$GetTextColor. For more information, see Special Naming Convention for Certain QuickWin and Win32 Graphics Routines in the Programmer's Guide.

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

See Also: OUTTEXT, REMAPPALETTERGB, SETCOLOR, SETTEXTCOLOR