gradientColor

Specifies the gradient fill for the Rectangle as an array.

Type

Array

[enabled,type,angle,"color1 endColor1","color2 endColor2",…​]

The array items are as follows:

enabled

true: display gradient, false: hide gradient.

type

'linear' or 'radial'

angle

The rotation of the gradient in degrees

colorN

Specification of the Nth color in one of the following formats:

number (hex)          Example: 0xFF0000
string (color name)   Example: 'red'
array [r,g,b]         Example: [255,0,0]
JSON {r:_,g:_,b:_}    Example: {r:255,g:0,b:0}
java.awt.Color        Example: java.awt.Color.BLUE (BLACK, CYAN, DARK_GRAY,
                               GRAY, GREEN, LIGHT_GRAY, MAGENTA, ORANGE,
                               PINK, RED, WHITE, YELLOW)
endColorN

The position in the gradient (between 0 and 100) where the Nth color ends. For linear gradient with no rotation, 0 represents the left side and 100 represents the right side. For radial gradient, 0 represents the center and 100 represents the periphery.

Example

Rectangle1.gradientColor = [true,"linear",45, "red 20","yellow 50"];

Either syntax below can be used in component script:

gradientColor           // unqualified
Rectangle1.gradientColor    // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.