Previous Next Up Title Contents Index Top Library

10.7. COLOR MODES

The number of colors available depends on the graphics card. The X11 color table manager may pose certain problems for applications like GPHIGS which are capable of managing their own color tables. When the cursor passes from one window to another a flash may occur, resource sharing may create difficulties, etc.

GPHIGS has four modes of operation, responding to the majority of needs. These modes are defined in the configuration file (see GPHIGS.def) by the %cm option.

colormode description advantages disadvantages
0 - GPHIGS creates a color map containing 16 standard colors and allocates a 125-index dithering table from index 16 to index 140. The environment colors used by window manager and other applications are stored at the end of the table to avoid flashes.- Xstorecolor is used for color redefinition. - All colors are available and redefinable.- The initial colors are standard (without flash). - Redefining the colors at the end of the table (environment) causes flash.- GPHIGS color indices do not correspond to x11 color indices.- Only one GPHIGS workstation may run this mode at a time.
1 - GPHIGS creates a color map containing 8 standard colors and allocates a 125-index dithering table from index 16 to index 140.- The number of colors available equals the number of colors free on the server.- Xstorecolor is used for color redefinition. - All available colors are redefinable without flash. - Not all of the server colors may be used.- GPHIGS color indices do not correspond to x11 indices.
2 - GPHIGS copies the color table from the server.- No colors are initialized by GPHIGS.- GPHIGS color indices correspond to x11 indices.-Xstorecolor is used for color redefinition. - Makes it possible to use GPHIGS in an x11 program that manages colors itself with xquerycolor. - Does not provide the standard color/color-index definitions of GPHIGS.- May cause flashes.- Dithering is not correctly performed
3 - GPHIGS works with the server color table by using xquerycolor.- Default color table is initialized by querying color indices on the server. - Eliminates the flash problem for good. - Color redefinition does not have an immediate effect.- The redefined color is not necessarily found in the server color map.

If more than one GPHIGS application runs on a single server at the same time, only the first application can allocate colors in color mode 0. Other ones use automatically color mode 3.


Previous Next Up Title Contents Index Top Library