StylingΒΆ

With the styling tag, elements can be assigned colors at respective values. For example, OFF can be displayed in red and ON in green (or vice versa). Here are a list of possible colors that are included by default in CometVisu:

grey
cyan
green
lime
red
blue
fuchsia
black
maroon
olive
purple
silver
white
yellow

Caution

The colors may vary depending on the design.

This styling shows 0 (often OFF) in green and 1 (often ON) in red.

<styling name="GreenRed">
   <entry value="0">green</entry>
   <entry value="1">red</entry>
</styling>

To render an element with the opposite colors, the following style tag must be created. Now the element at a value of 0 has the color red.

<styling name="Red_Green">
   <entry value="0">red</entry>
   <entry value="1">green</entry>
</styling>

Of course, styling tags can also be created for slider. This sets the value for the area in which the color is displayed. In the following example as follows:

  • from -100 to 0: blau
  • the value 0: lila
  • values greater 0: rot
<styling name="BluePurpleRed">
   <entry range_min="-100" range_max="0">blue</entry>
   <entry value="0">purple</entry>
   <entry range_min="0" range_max="100">red</entry>
</styling>

Important

How the colors are actually displayed in the design depends on the definition in the CSS for the respective designs.

The colors can also be specified in the HTML code. For example: #F33333