Difference between revisions of "DEFAULTCOLOR"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>SMcNeill
(style guidelines)
 
Line 4: Line 4:
  
 
{{PageSyntax}}
 
{{PageSyntax}}
:''result&'' = {{KW|_DEFAULTCOLOR}} [({{Parameter|imageHandle&}})]
+
:{{Parameter|result&}} = [[_DEFAULTCOLOR]] [({{Parameter|imageHandle&}})]
  
  
 
{{PageDescription}}
 
{{PageDescription}}
 
* If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current write page or image designated by [[_DEST]].
 
* If {{Parameter|imageHandle&}} is omitted, it is assumed to be the current write page or image designated by [[_DEST]].
* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error occurs. Check handle values first!
+
* If {{Parameter|imageHandle&}} is an invalid handle, an [[ERROR Codes|invalid handle]] error occurs. Check handle values first.
* Default foreground colors: [[SCREEN]] 0 = 7, [[SCREEN]] 1 and 10 = 3, [[SCREEN]] 2 and 11 = 1. All other [[SCREEN]]s = 15.  
+
* Default foreground colors are: [[SCREEN]] 0 = 7, [[SCREEN]] 1 and 10 = 3, [[SCREEN]] 2 and 11 = 1. All other [[SCREEN]]s = 15.  
  
  
 +
{{PageExamples}}
 
''Example:'' The default color is the color assigned to the text foreground. The [[SCREEN]] 12 default is [[COLOR]] 15.
 
''Example:'' The default color is the color assigned to the text foreground. The [[SCREEN]] 12 default is [[COLOR]] 15.
 
{{CodeStart}} '' ''
 
{{CodeStart}} '' ''

Latest revision as of 14:30, 5 September 2017

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


Syntax

result& = _DEFAULTCOLOR [(imageHandle&)]


Description

  • If imageHandle& is omitted, it is assumed to be the current write page or image designated by _DEST.
  • If imageHandle& is an invalid handle, an invalid handle error occurs. Check handle values first.
  • Default foreground colors are: SCREEN 0 = 7, SCREEN 1 and 10 = 3, SCREEN 2 and 11 = 1. All other SCREENs = 15.


Examples

Example: 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



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page