Please enable JavaScript to view this site.

ESL Documentation

Each graphical, textual, and image region has a foreground color, a background color, and, if you specify a color border, a border color. You can specify each of these colors in the region's definition.

 

The background color is the color of the field on which the contents of a region are displayed. For example, the following definition defines a graphical region with a yellow background:

 

yellow graphical region Help size 10 25 at position 0 0

 

No border is specified, so the region is displayed as a solid yellow rectangle. The contents of the region are drawn on top of this yellow background. (If you do not specify a background color, the background is drawn in the default color of black.)

 

The foreground color is the default color for the region's drawing statements. Any drawing statement in the contents of the region that does not have its own color specification is drawn in the foreground color. For example, you can specify a foreground color by defining a graphical region such as:

 

graphical region Small size 20 50 at position 200 200

    aqua foreground

    move to 10 25

    circle radius 5

 

This circle drawing statement, which does not have a color specification, is drawn in aqua, the color specified for the graphical region's foreground. (If you do not specify a foreground color, the circle is drawn in white, the default color for the foreground of the region.)

 

For textual regions, the foreground color is the color of all the text. If you want to specify different colors for individual characters, rather than just one color for the entire text, you must define and use a colored textual region (described in Textual Regions).

 

You can change any or all of the colors in an object during runtime. You can change the foreground of a key and you can change the foreground, background, and border of a region. You might, for example, change the color of a key to show that it has been selected.