RGB: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
RGB(''red'', ''green'', ''blue'')
Rgb(''red'', ''green'', ''blue'')


== Description ==
== Description ==


RGB returns a whole number representing an RGB color value.  ''red'', ''green'' and ''blue'' are numbers from 0-255 representing their respective components in the color.
Rgb returns a whole number representing an RGB color value.  ''red'', ''green'' and ''blue'' are numbers from 0-255 representing their respective components in the color.


== Example ==
== Example ==


<pre>
<pre>
Rem RGB Example
Rem Rgb Example
'RGB returns a combined color value
'Rgb returns a combined color value
Print "Black=" & RGB(0,0,0)
Print "Black=" & Rgb(0,0,0)
Print "White=" & RGB(255,255,255)
Print "White=" & Rgb(255,255,255)
Print "Red=" & RGB(255,0,0)
Print "Red=" & Rgb(255,0,0)
Print vbBlack, vbWhite, vbRed
Print vbBlack, vbWhite, vbRed
</pre>
</pre>

Revision as of 01:34, 24 August 2012

Rgb(red, green, blue)

Description

Rgb returns a whole number representing an RGB color value. red, green and blue are numbers from 0-255 representing their respective components in the color.

Example

Rem Rgb Example
'Rgb returns a combined color value
Print "Black=" & Rgb(0,0,0)
Print "White=" & Rgb(255,255,255)
Print "Red=" & Rgb(255,0,0)
Print vbBlack, vbWhite, vbRed

Output

Black=0
White=16777215
Red=255
0 16777215 215