Difference between revisions of "BLUE32"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Odin
(Created page with "{{DISPLAYTITLE: _BLUE32}} The '''_BLUE32''' function returns the intensity of the blue component of a 32-bit color value, ranging from 0 to 255. == Syntax == blueAmount = ''...")
Line 1: Line 1:
{{DISPLAYTITLE:_BLUE32}}
+
{{DISPLAYTITLE: _BLUE32}}
The [[_BLUE32]] function ALWAYS returns the blue component intensity of a 32-bit image ot surface color.
 
  
 +
The '''_BLUE32''' function returns the intensity of the blue component of a 32-bit color value, ranging from 0 to 255.
  
{{PageSyntax}}
+
== Syntax ==
:: blue32color& = '''_BLUE32('''{{Parameter|rgbaColor&}}''')'''
+
blueAmount = '''_BLUE32'''(colorValue~&)
  
 +
== Example ==
 +
<source lang="qbasic">
 +
SCREEN _NEWIMAGE(640, 400, 32)
 +
BdazzeldBlue~& = _RGB32(46, 88, 148)
  
{{PageDescription}}
+
PRINT "B'dazzled blue is a color in Crayola Metallic FX,"
* {{Parameter|rgbaColor&}} is the 32-bit ''RGBA'' color value to retrieve the blue component intensity value from.
+
PRINT "a specialty set of Crayola crayons introduced in 2001."
* ''RGBA'' color values are returned by the {{KW|_PALETTECOLOR (function)|_PALETTECOLOR}}, {{KW|POINT}}, {{KW|_RGB}}, {{KW|_RGB32}}, {{KW|_RGBA}} or {{KW|_RGBA32}} functions.
+
PRINT
* [[LONG]] intensity values returned range from 0 (no intensity, not present) to 255 (full intensity). '''Do NOT use SINGLE variables!'''
+
PRINT "Color coordinates (r, g, b) are:";
 +
PRINT _RED32(BdazzeldBlue~&); ","; _GREEN32(BdazzeldBlue~&); ","; _BLUE32(BdazzeldBlue~&)
 +
PRINT
 +
PRINT "Here's a sample: ";
 +
COLOR BdazzeldBlue~&
 +
PRINT STRING$(10, 219) 'ASCII character 219 (solid block)
 +
</source>
  
 
+
''Output:''
''See Example:''  
+
[[File:Sample code showcasing RED32, GREEN32, BLUE32.png|center]]
* [[POINT]]
 
 
 
 
 
{{PageSeeAlso}}
 
* {{KW|_RED32}}, {{KW|_GREEN32}}
 
* {{KW|_RGB32}}, {{KW|_BLUE}}
 
 
 
 
 
{{PageNavigation}}
 

Revision as of 03:02, 25 July 2017


The _BLUE32 function returns the intensity of the blue component of a 32-bit color value, ranging from 0 to 255.

Syntax

blueAmount = _BLUE32(colorValue~&)

Example

<source lang="qbasic"> SCREEN _NEWIMAGE(640, 400, 32) BdazzeldBlue~& = _RGB32(46, 88, 148)

PRINT "B'dazzled blue is a color in Crayola Metallic FX," PRINT "a specialty set of Crayola crayons introduced in 2001." PRINT PRINT "Color coordinates (r, g, b) are:"; PRINT _RED32(BdazzeldBlue~&); ","; _GREEN32(BdazzeldBlue~&); ","; _BLUE32(BdazzeldBlue~&) PRINT PRINT "Here's a sample: "; COLOR BdazzeldBlue~& PRINT STRING$(10, 219) 'ASCII character 219 (solid block) </source>

Output: