Language Reference Guide : Functions : Core Library Functions : RGB Function
 
Share this page          
RGB Function
The RGB function returns an integer representing an RGB color value. It combines the bytes in the right order and sets the high bit to indicate that it is an RGB value instead of a color index.
This function has the following syntax:
integer = RGB(red = value, green = value, blue = value)
Arguments
Data Type
Description
red
Integer
Value in the range of 0–255, inclusive, that represents the red component of the color
green
Integer
Value in the range of 0–255, inclusive, that represents the green component of the color
blue
Integer
Value in the range of 0–255, inclusive, that represents the blue component of the color
Example—RGB function:
color = RGB(red = 0, green = 155, blue = 205)