Difference between revisions of "RGB"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 1: Line 1:
The {{KW|_RGB}} function returns the closest palette index OR the 32 bit color value in 32 bit screens only.
+
The [[_RGB]] function returns the closest palette index OR the 32 bit color value in 32 bit screens only.
  
  
:{{Parameter|colorindex&}} = {{KW|_RGB}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}[, {{Parameter|image_handle}}])
+
:{{Parameter|colorindex&}} = [[_RGB]]({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}[, {{Parameter|image_handle}}])
  
  
Line 14: Line 14:
  
 
{{PageSeeAlso}}
 
{{PageSeeAlso}}
*{{KW|_RGBA}}, {{KW|_RGB32}}, {{KW|_RGBA32}}
+
* [[_RGBA]], [[_RGB32]], [[_RGBA32]]
*{{KW|_RED}}, {{KW|_GREEN}}, {{KW|_BLUE}}
+
* [[_RED]], [[_GREEN]], [[_BLUE]]
*{{KW|_LOADIMAGE}}
+
* [[_LOADIMAGE]]
  
  
 
{{PageNavigation}}
 
{{PageNavigation}}

Revision as of 04:55, 25 May 2011

The _RGB function returns the closest palette index OR the 32 bit color value in 32 bit screens only.


colorindex& = _RGB(red, green, blue[, image_handle])


  • The value returned is either the closest color attribute number or a 32 bit LONG color value.
  • red& specifies the red component intensity.
  • green& specifies the green component intensity.
  • blue& specifies the blue component intensity.
  • Valid component intensity values range from 0 (no intensity; color not present) to 255 (full intensity).
  • Values outside the valid range are clipped.


See also



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page