RGB: Difference between revisions
Jump to navigation
Jump to search
Created page with "RGB(''red'', ''green'', ''blue'') '''Description''' RGB returns a whole number representing an RGB color value. ''red'', ''green'' and ''blue'' are numbers from 0-255 repre..." |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.'' | |||
''' | 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 (BASIC) == | |||
<pre> | <pre> | ||
Rem Rgb Example | |||
' | 'Rgb returns a combined color value | ||
Print "Black=" & | Print "Black=" & Rgb(0,0,0) | ||
Print "White=" & | Print "White=" & Rgb(255,255,255) | ||
Print "Red=" & | Print "Red=" & Rgb(255,0,0) | ||
Print vbBlack, vbWhite, vbRed | Print vbBlack, vbWhite, vbRed | ||
</pre> | </pre> | ||
== Output == | |||
<pre> | <pre> | ||
Line 24: | Line 26: | ||
0 16777215 215 | 0 16777215 215 | ||
</pre> | </pre> | ||
[[Category:Language Reference]] | |||
[[Category:Strings]] | |||
[[Category:BASIC Functions]] |
Latest revision as of 15:32, 25 March 2019
This function is for BASIC compatibility. It is not available in pure JavaScript projects.
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 (BASIC)
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