With a Color type animation, you can change the colors of objects on the mimic display.


A javascript expression is applied to change the color of a selected text object, as shown in Figure 1.

Let's examine the code below, written in the expression part of Figure 1.

// Retrieving variable named Percent.
var tag=ins.getVariableValue("Percent");
// Check for Null. If Null object will be in purple.
if (tag===null) {
    return "purple";
// The variable named Percent makes it possible to display the 
// object in different colors according to the ranges defined below.
if (tag.value>0 && tag.value<11) {
    return "red";

if (tag.value>10 && tag.value<21) {
    return "gray";

if (tag.value>20 && tag.value<31) {
    return "blue";

if (tag.value>30 && tag.value<41) {
    return "lime";

if (tag.value>40) {
    return "yellow";

return "green";


As shown in Figure 2, we make a selected variable appear in different colors on different values on a selected object, without coding, by adding or editing the configuration settings on the form.

Let us examine the details of the Color-Switch Form shown in Figure 3 below.

When you open the animation wizard form for a selected object as in Figure 2, switch to the color tab and click the switch radio button on the right side, the form in Figure 3 opens. Here you will be prompted for the following parameters.

  • Variable: The variable to which we want to link our Color animation.

  • Default Value : If the value of the variable that we are connecting to cannot be read or if the communication is gone. (Example : #7A006D)

In the Color section, you are asked for two colors. Here the second color is not mandatory. When you enter the second color, it will blink between the two selected colors.

Color-Switch Gradient

Switch-color gradient animation on a selected object, as shown in Figure 5, allows a variable value to switch proportionally over the selected two colors between 0 and 100 values.

When we select the Gradient checkbox at the bottom of the form in Figure 5, we make the proportional transition between two colors in the related conditions. In this example, we make the selected object to switch from dark red to light red by variable value.

Last updated