Colors

Colors for EDM displays are specified in "colors.list".
The default location is /etc but may be overridden with
the environment variable EDMFILES.

RGB Values, Indices and Names

Most widgets have more than one color: foreground, background,
border, shadow, ... There are several ways to address such a color:

RGB
The triple of RGB values, that is the intensity of red, green and blue,
defines what a color actually looks like on the screen.
Each intensity is an integer from 0 up to a configurable limit,
e.g. 255.

Name
A string for the color. This name can be based on the meaning
of the color, e.g. "background=RGB(0, 0, 255)" or describe how
the color looks as in "red=RGB(255, 0, 0)".
Note that noone prevents you from calling the RGB(255, 0, 0)
"green": For EDM, the color name is an arbitrary string.

Palette, Index
EDM puts all the defined colors into a palette. The colors in
there are indexed beginning with zero.

The colors.list file defines the palette, the relationship between
names, indices and actual RGB values.
Originally, all widgets stored the palette index in the display
file. Some widgets do now store the name in the display file.

When configuring a widget, the color can be selected by name or
picked from a dialog displaying the whole color palette.
Note: Since many widgets save the color as an index, care must be taken
when rearranging the color file.

Color Rules

Color rules may follow the static color definitions:

rule Rainbow
{
<0 : red
>0 : green
default : black
}

This color will change, depending on the Color Value,
from green for positive value over black for zero into red for
negative values. The Color Value is provided by the
widget. For most widgets it will be the current value of the readback
or control PV, some widgets might allow for a separate "Color PV" that
can be different from the main PV.