Scripting > UNICOM Intelligence Function Library > Miscellaneous functions > RGB
 
RGB
Returns a number representing an RGB color value.
Syntax
RGB(Red, Green, Blue)
Parameters
Red
Type: Long
Red value.
Green
Type: Long
Green value.
Blue
Type: Long
Blue value.
(return)
Type: Long
Color value.
Remarks
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