RGB()

Syntax:

RGB( Red, Green, Blue )

Return:

A number indicating a RGB colour value. Each number entered in the red, green and blue parameters are combined to produce a unique number (i.e. RGB colour value) that will generate a different colour.

Parameters:

Red – A number indicating the amount of red used in the colour. The number can be any number in the range 0 to 255. 0 is equal to no amount of red used to make the colour and 255 is a full red value. The number must be an integer. This parameter will also accept a variable containing an integer. This parameter is optional and the default value is 0.

Green – A number indicating the amount of green used in the colour. The number can be any number in the range 0 to 255. 0 is equal to no amount of green used to make the colour and 255 is a full green value. The number must be an integer. This parameter will also accept a variable containing an integer. This parameter is optional and the default value is 0.

Blue – A number indicating the amount of blue used in the colour. The number can be any number in the range 0 to 255. 0 is equal to no amount of blue used to make the colour and 255 is a full blue value. The number must be an integer. This parameter will also accept a variable containing an integer. This parameter is required and the default value is 0.

Remarks:

The RGB function allows you to generate a colour value that can then be applied to objects on a page using other OpusScript functions, such as, SetColour, SetBtnColour and SetFlare. You can make any combination of colour by setting the amount of red, green and blue in the parameters. This is particularly useful if you want to change the colour of objects displayed based on a user’s preference.

image\Script_Button.jpgExamples