User Tools

Site Tools


color

Color


A color is a scripting data type that represents an RGB color value and is written as either color[R, G, B] or color[“RRGGBB”]. The R, G, and B values correspond to the intensity of the red, green, and blue elements of the color. When using the color[R, G, B] syntax, each parameter value should be an integer ranging from 0 to 255. When using the color[“RRGGBB”] syntax, the “RRGGBB” string should be a valid six-character hexadecimal code ranging from “000000” (black) to “ffffff” (white).

Examples:

color[0, 0, 255]
color["0000ff"]

The examples above both represent full intensity blue. The RGB values or six-character hexadecimal code can be taken from one of the built-in color pickers (for example, by editing a palette color on the Editor Tools tab), or from many common image editing applications like Microsoft Paint.

When working in the visual Script Editor, any function that has a color parameter will provide a color picker button in its visual node (as shown in the example below) that can be clicked on to select a color.

The following scripting functions include a color parameter:

color.txt · Last modified: 2020/02/15 14:14 by justin