Skip to main content
Version: 8.1

color

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])

Parameters​

TypeParameterDescription
IntegerredThe intensity of red, between 0 - 255.
IntegergreenThe intensity of green, between 0 - 255.
IntegerblueThe intensity of blue, between 0 - 255.
IntegeralphaThe amount of transparency, between 0 - 255. [optional]

Results​

Color - Returns a color with the given RGB value.

Examples​

There are no expression function examples associated with this expression function.