QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _DEFAULTCOLOR function returns the current default text color for an image handle or page.

Syntax

result& = _DEFAULTCOLOR [(imageHandle&)]

Description

Example(s)

The default color is the color assigned to the text foreground. The SCREEN 12 default is COLOR 15.


SCREEN 12
OUT &H3C8, 0: OUT &H3C9, 63: OUT &H3C9, 63: OUT &H3C9, 63  'assign background RGB intensities
OUT &H3C8, 8: OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, 0     'assign RGB intensities to COLOR 8
_PRINTMODE  _KEEPBACKGROUND
COLOR 8                                                    'assign color 8 to text foreground
PRINT "The default color is attribute"; _DEFAULTCOLOR 

See Also