Basic Structure
The <colors>
element defines the colour for the System
Model items. The following is the structure of a colour section:
<colors default="colour" type="colour-type" …>
<color color="colour" label="legend-label"/>
<!-- either this or default can be specified, not both -->
<color color="colour" value="value" label="legend-label"/>
…
Note: There can be only one section in the Shapes XML file
that defines the background colour any specific system model item. In other
words, at most one section that colours components, at most one section that
colours blocks and so on.
The <colors>
element uses the standard attributes
defined in Display Option Groups. It
contains an extra default
attribute which allows specifying a
default color without using the <color>
element.
Each contained <color>
acts as switch statement,
meaning that the value at the XPath location is matched, in order, against the
value of each <color>
value or rule. The color used is the
color attribute of the first <color>
to match.
The <colors>
element takes the optional attribute
type
. This attribute is used to indicate what aspect of the System
Model item can be colored by this group. The following are the possible values
of the type
attribute:
-
background
: Fills the shape with the selected color.
-
highlight
: Draws a blurred background color behind the
shape with the selected color.
-
highlight-text
: Provides a blurred background color for
the name of the item (text is always drawn in black).
There can be multiple background colors on any object. However, this can
only be done if colors section only match by values. The reason for this is
that the first rule to match is applied, and allowing multiple matches may lead
to very complicated rules.
Each value of the <color>
element that matches for the
item appears as a band of color across the object. The size, direction and edge
blur of the band can be controlled.