GETCOLORRANGE

Returns the RGBA values of multiple colors as an array, or the value of a single color. The function is used to pass colors from the Application Studio color palette to web extensions.

See Inserting web extensions.

The color palette contains 64 colors in a grid of 8 rows and 8 columns. Each color in the palette is identified by an index number from 1 to 64. The index numbers increment from top to bottom and from left to right of the grid.

The arguments of GETCOLORRANGE are the index number; num_right, a number of colors from the index number to the right; and num_down, a number of rows downwards from the index. With these arguments you can specify an individual color, one-dimensional arrays of colors, and two-dimensional arrays of colors.

Syntax

GETCOLORRANGE(index,num_right,num_down)

Example - single color

When you specify a single color, the num_down parameter is optional, but defaults to 1. These examples return the same single color:

=GETCOLORRANGE(2,1)

=GETCOLORRANGE(2,1,1)

Note: These examples return the same result as this example of the GETCOLOR function:

=GETCOLOR(2).

See GETCOLOR

Example - one-dimensional array

This example returns an array of sixteen color values. The first color is the 34th in the grid and the sixteenth color is 49th color in the grid:

=GETCOLORRANGE(34,l6)

Example - two-dimensional array

This example returns an array of twelve colors. The array contains four rows of three colors each. The first color is the 5th in the grid and the twelfth is the 31st. That is, the function specifies the three colors to the right of the fifth color in the grid, and four rows down from the top of the grid:

=GETCOLORRANGE(5,3,4)

Related topics