rgba()

Function group Execute on client Platform(s)
General YES All

Syntax

rgba(red,green,blue,alpha)
or
rgba(constant,alpha)

Description

Returns the RGBA value formed from the 3 supplied color components (each of which must be 0-255) and an alpha component (0-255), where 255 is fully opaque. Alternatively, a color constant and an alpha value can be supplied.

The four arguments red, green, blue, alpha correspond to the RGBA value of the desired color; each must be an integer in the range 0-255.

The return value can be assigned to an RGBA color property, but only where a color and alpha value is required.

See also rgb().

Example

Do  $cinst.$objs.FIELD1.$examplecolor.$assign(rgb(0,178,178,127))
# changes the object color to green with 50% opacity
Do $cinst.$objs.FIELD1.$examplecolor.$assign(rgb(kRed,192))
# changes the object color to red with 75% opacity