aiSee User Manual: Colors

aiSee has a color map of 256 colors of which 254 can be used. The first 32 colors (index 0–31) of the color map are the default colors. These colors can be specified by their color map index number or by name. All other colors can only be specified by their color map index number.

A color map entry is changed by using the GDL attribute colorentry, which assignes an RGB triple to a color map index number. For example, the following code snippet introduces the colors "alice blue", "indian red" and "sea green" with color indices 32, 33 and 34:

colorentry 32: 210 218 255  // alice blue
colorentry 33: 205  92  92  // indian red
colorentry 34:  46 139  87  // sea green

If blue, a default color, is to be used, then the specification can be done via color: blue or color: 1. In order to use sea green as a node color, color: seagreen cannot be specified since "seagreen" is unknown to aiSee as a keyword. The index number color: 34 has to be used instead.

However, the default colors can be overwritten. For example,

colorentry 1: 210 218 255  // alice blue
colorentry 2: 205  92  92  // indian red
colorentry 3:  46 139  87  // sea green

causes the default colors blue, red and green to be overwritten (see the table below). Now, if color: green is specified, the color sea green appears.

aiSee.com Sitemap
Bar graph
History of computer languages
Layout algorithms
Moscow subway map

The color map

The table below shows the color codes of the default color map along with the corresponding RGB triples.

No. Color name RGB No. Color name RGB
0 white 255 255 255 16 lightblue 128 128 255
1 blue   0   0 255 17 lightred 255 128 128
2 red 255   0   0 18 lightgreen 128 255 128
3 green   0 255   0 19 lightyellow 255 255 128
4 yellow 255 255   0 20 lightmagenta 255 128 255
5 magenta 255   0 255 21 lightcyan 128 255 255
6 cyan   0 255 255 22 lilac 238 130 238
7 darkgrey  85  85  85 23 turquoise  64 224 208
8 darkblue   0   0 128 24 aquamarine 127 255 212
9 darkred 128   0   0 25 khaki 240 230 140
10 darkgreen   0 128   0 26 purple 160  32 240
11 darkyellow 128 128   0 27 yellowgreen 154 205  50
12 darkmagenta 128   0 128 28 pink 255 192 203
13 darkcyan   0 128 128 29 orange 255 165   0
14 gold 255 215   0 30 orchid 218 112 214
15 lightgrey 170 170 170 31 black   0   0   0

GDL attributes

Name Attribute of Default value
color Nodes, top-level graph background, subgraph background, summary nodes white
color Edges, summary edges black
textcolor Nodes, subgraphs, summary nodes, edges, summary edges black
bordercolor Nodes, subgraphs, summary nodes The value of textcolor
arrowcolor Edges, summary edges The same color as the edge itself
backarrowcolor Edges, summary edges The same color as the edge itself

Hint 1: Switching text color

The ASCII formfeed character \f followed by two digits signifying a color changes the color for the characters following in a string, thus enabling the first 100 colors of the color map to be accessed. For example, the string

"\f02R\f29A\f14I\f03N\f06B\f01O\f12W\f31 NORMAL"

will be visualized as follows:

RAINBOW NORMAL

This works for all kinds of text (node/edge/subgraph labels, additional information windows), independent of the font used.

Hint 2: SVG image background color

SVG does not support specifying an image background color. However, you can work around this problem by artificially enlarging the layout plane as follows:

  1. Set the top-level graph attributes xbase and ybase to high values, for example:

    xbase:1000 ybase:1000

  2. Export the graph to SVG.

  3. Open the SVG file with a text editor and manually adjust the four values of the viewBox attribute. This attribute is to be found in the third line of the SVG file.

Hint 3: Node information windows

Overwriting default colors (cf. above) also comes in handy for changing the color of aiSee's additional node information windows. This color is not bound to the RGB constant 255 255 255, but rather to the value of the first entry of the color map (which happens to be 255 255 255 by default). Thus, for example, specifying

colorentry 0: 210 218 255
               // white is now alice blue

sets the background color of all additional node information windows to alice blue. Of course, this color now also appears everywhere else where the color white is used. Thus, you might wish to further specify:

colorentry 32: 255 255 255
               // 32 is now white
color:32  node.color:32  foldnode.color:32
               // graph background, nodes, and
               // summary nodes are still white

Similarly, the information windows’ text/border color is not bound to the RGB constant 0 0 0, but rather to the value of the 32nd entry of the color map (color no. 31).

Additional node information windows