Go to: Synopsis. Flags. Return value. MEL examples.

Synopsis

colorIndex [-hueSaturationValue] [-resetToFactory] [-resetToSaved] [index] [r g b]

colorIndex is undoable, queryable, and editable.

The index specifies a color index in the color palette. The r, g, and b values (between 0-1) specify the RGB values (or the HSV values if the -hsv flag is used) for the color.

Flags

hueSaturationValue, resetToFactory, resetToSaved
Long name (short name) [argument types] Properties
-resetToFactory(-rf) create
Resets all color index palette entries to their factory defaults.
-resetToSaved(-rs) create
Resets all color palette entries to their saved values.
-hueSaturationValue(-hsv) createquery
Indicates that rgb values are really hsv values. Upon query, returns the HSV valuses as an array of 3 floats.

In query mode, this flag needs a value.


Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command

Return value


Returns an array of 3 floats in the query mode. Otherwise, returns 1 on success.

MEL examples

// Set the first entry in the color palette to have RGB values 1 0 0 - red.
colorIndex 1 1 0 0;

// Set the first entry in the color palette to have HSV values 360 1 1 - red.
colorIndex -hsv 1 360 0 0;

// Return the RGB color values of the first entry of the color palette.
colorIndex -q 1;

// Return the HSV color values of the first entry of the color palette.
colorIndex -q -hsv 1;