Object icons. A dynamic coloring of icons

Viber Bot

Russian version

The service has updated and expanded the set of object icons. To select an object icon, click on "Basic Info" in the object's context menu. To change the icon, click on the icon block. Select a group of icons and select the desired icon in it. You can upload your own icon. To do this, select the "Custom" group and upload or select the desired icon. User icons must be 28 x 28. To change the color of the icon, click on the "Palette" button. When the color is changed, only black pixels of the image are processed. Color replacement in user icons is also carried out taking into account this rule.

A dynamic coloring of icons
Icons can be dynamically recolored depending on the values of the object parameters. To do this, select "Settings" in the context menu and click on the "Script" button. In the window that opens, enter or add a macro to the contents of the script:
 .ICON_COLOR V 0 GRAY; 50 00FF00; * RED; 
  • .ICON_COLOR - macros name
  • V - parameter, depending on the value of which the icon is recolored
  • 0 GRAY; ... - groups defining intervals of parameter values and their corresponding colors


Viber Bot

In this example, the recoloring processed on the object speed value (parameter V). At zero speed (value less than or equal to the specified value), the icon turns gray. At speeds from 0 to 50(included), the icon turns green. When the speed is over 50, the icon will turn red. As a color, you can use either its hexadecimal value or symbolic color constants. You can set your own intervals:
.ICON_COLOR V 0 00FF00; 20 00FF00; 40 00FF00; 60 00FF00; * RED;
or your parameters (battery - B, sensor D1, ...):
.ICON_COLOR B 3.0 RED; * GREEN;

Symbolic color constants
WHITE SILVER GRAY BLACK
RED MAROON YELLOW OLIVE
LIME GREEN AQUA TEAL
BLUE NAVY FUCHSIA PURPLE


When such a macros is added to a group script, dynamic coloring will be applied to all objects in the group (for which their own scripts are not specified).

Contact Us

Processing request ...
Your message has been sent. Thank you!
The form fields contain incorrect values!