system.gui.color

Description

Creates a new color object, either by parsing a string or by having the RGB[A] channels specified explicitly.

Syntax

system.gui. color( color )

  • Parameters

String color - A string that will be coerced into a color. Can accept many formats, such as "red" or "#FF0000" or "255,0,0"

  • Returns

Color - The newly created color.

  • Scope

All

Syntax

system.gui. color( red, green, blue [, alpha] )

  • Parameters

int red - The red component of the color, an integer 0-255.

int green - The green component of the color, an integer 0-255.

int blue - The blue component of the color, an integer 0-255.

int alpha - The alpha component of the color, an integer 0-255. [optional]

  • Returns

Color - The newly created color.

  • Scope

All

Code Examples
Code Snippet
#This example changes the background color of a component to red.
myComponent = event.source
myComponent.background = system.gui.color(255,0,0) # turn the component red