This function is used by Ignition's Expression language.

Description

Creates a color using the given red, green, and blue amounts, which are integers between 0-255. The optional alpha channel to the color controls transparency.

Note: This function was designed to return color objects to Vision bindings, and will not work with Perspective bindings. Instead, Perspective color properties can simply use string hex codes to derive a color from a binding, for example: "#00FF00".

Syntax

color(red, green, blue, [alpha])

  • Parameter

Integer red - The intensity of red, between 0 - 255.

Integer green - The intensity of green, between 0 - 255.

Integer blue - The intensity of blue, between 0 - 255.

Integer alpha - The amount of transparency, between 0 - 255. [optional]

  • Results

Color - Returns a color with the given RGB value.

Examples

There are no examples associated with this expression function.

  • No labels