paint
  • 30 Oct 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

paint

  • Dark
    Light
  • PDF

Article Summary

Description

Paints (colors) the specified app object(s).


Input Parameters

NameTypeRequiredDescription
tokensOrNamesTextYesComma-seperated list of app object token(s) or name(s)
[on]BooleanNoPaint toggle (true = paint, false = unpaint)
[color]TextNoDesired color in hex format (#RRGGBB)
[opacity]NumberNoOpacity value from 0 (transparent) to 1 (opaque)

Returns

No return value.


Examples

// paint app objects [10] and [15] using default settings
app.paint("[10], [15]");
// paint app objects [10] and [15] blue with 25% opacity
app.paint("[10], [15]", true, "#0000FF", 0.25);
// paint app objects [10] and [15] using the built-in 'info' color
app.paint("[10], [15]", true, "info");

Remarks

In addition to being able to specify a custom color and opacity, the runtime supports a few standard colors you can use by specifying their name:

Name 1Name 2Description
WarningRedA light-red color
AlertYellowA light-yellow color
InsightGreenA light-green color
InfoBlueA light-blue color
Token Syntax

This function uses the native app object token syntax, which refers to the ID of an object within your app that is enclosed in square brackets.

Example: [10]


What's Next