RGB Function

Return a RGB color value based on the three component colors (Red, Green and Blue).

Note

There are predefined constants in the form clrxxx for the standard 16 RGB colors.

RGB (red, green, blue)

Parameters

Red  -  (Input, expression, Required)

Specifies the intensity of the red component (ranging from 0 to 255).

Green  -  (Input, expression, Required)

Specifies the intensity of the green component (ranging from 0 to 255).

Blue  -  (Input, expression, Required)

Specifies the intensity of the blue component (ranging from 0 to 255).

Return Value

A RGB value that can be used wherever a color value is required. Error will be returned if any of the component colors are not integer expressions.

Examples

RGB (255, 255, 255) = clrWhite

Returns True

RGB (0, 0, 0) = clrBlack

Returns True

RGB (255, 0, 0) = clrRed

Returns True

RGB (0, 255, 0)= clrGreen

Returns True

RGB (0, 0, 255) = clrBlue

Returns True

RGB (255, 255, 0) = clrYellow

Returns True

RGB (0, 255, 255) = clrCyan

Returns True

RGB (255, 0, 255) = clrMagenta

Returns True

RGB (192, 192, 192) = clrGray

Returns True

RGB (128, 128, 128) = clrDarkGray

Returns True

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See Also

Functions | Environ function | IsAppRunning function | QBColor function | RGB function | Shell function


© 2004-2021 looksoftware. All rights reserved.