Developer Documentation Library > UNICOM Intelligence Function Library > Miscellaneous functions > RGB
 
RGB
Returns a number representing an RGB color value.
Syntax
RGB(<red_value>, <green_value>, <blue_value>)
Parameters
<red_value>
Type: Long
Red value.
<green_value>
Type: Long
Green value.
<blue_value>
Type: Long
Blue value.
(return)
Type: Long
Color value.
Notes
The return value is an RGB color value using the given intensities of red, green and blue. If any of the input values is less than 0, it is converted to 0. If any of the input values is greater than 255, it is converted to 255.
This function is similar to the RGB function in Visual Basic.
Example
This example shows how the RGB function can be used to return a whole number that represents the RGB value for the color yellow:
Dim Yellow
Yellow = RGB(255, 255, 0)
See also
CreateObject
Miscellaneous functions