DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Changing colors

The scocolor client

The Graphical Environment provides the scocolor client, a color palette editor. This client allows users to control the colors that are used for the basic display elements of the Graphical Environment, including window frames and backgrounds. In general, this client is the preferred tool if a user wants to change the colors used by the Graphical Environment.


NOTE: The scocolor client requires an X server that supports at least 16 colors or grayscales. Only PseudoColor and grayscale visual X servers are supported. If you try to run scocolor on a monochrome system, you see an error message.

It is not the aim of this section to explain how to use the scocolor client. Rather, this section focuses on how the scocolor client interacts with client color resources to specify the color elements of the Graphical Environment display. If you are unfamiliar with how to use the scocolor client, refer to ``Changing colors with the Color control''.

See also:


Color palettes

A color palette is a collection of eight colors that controls the color scheme for the Graphical Environment. The eight palette colors are loaded into color buttons, or cells, where each button controls a specific aspect of the environment. The following list correlates each color button with the elements of the environment it affects:


Background
controls the background color of all windows on the screen, including directory windows, scoterm windows, and windows in which other clients are running

Foreground
controls the foreground color of all windows. The foreground usually consists of text, including lists, menus, buttons, icon labels, and so forth.

Top shadow
controls the top shadow color of the window frame. This resource gives a window its three-dimensional appearance, especially if the color is a lighter shade of the background color.

Active window
controls the background color in the window frame for the currently active window

Active foreground
controls the foreground color in the window frame, usually text, for the currently active window

Active top shadow
controls the color of the top shadow on the frame of the currently active window

Alternate background
controls the color of the Desktop background, as well as the color for scrollbar and sliderbar troughs and the icon box background, if in use

Highlight
controls the color of a button when it is pressed
Note that the bottom shadow of a window frame is always black.

The following diagram illustrates the effects the different color buttons have on your Graphical Environment display:

Effects of color palettes on the Graphical Environment

Color resources and the color palettes

All of the clients provided with the system, including the standard X11 clients, have been configured to use colors defined by the current palette. If you change the color in a palette, or select an entirely new palette, all of the clients that you run adhere to the same color scheme.


X clients are configured to use scocolor's palettes through ``palette resource variables''. You assign a palette resource variable to a color resource instead of specifying an actual color value for the resource. The X server replaces the palette resource variables with the actual colors that are configured by the current palette when a client is invoked.

``Relationship between palette resource variables and color buttons'' lists the palette resource variables and the color buttons to which they correspond:

Relationship between palette resource variables and color buttons

Palette resource variable Corresponding color button
 
scoBackground Background
 
scoForeground Foreground
 
scoTopShadow Top shadow
 
scoActiveBackground Active window
 
scoActiveForeground Active foreground
 
scoActiveTopShadow Active top shadow
 
scoAltBackground Alternate background
 
scoHighlight Highlight
Some of the client resource files in the /usr/lib/X11/sco/startup and /usr/lib/X11/app-defaults directories, such as Pmwm and ScoTerm, set color resources using the resource variables described above. Other clients do not set color resources, either because there is no resource file for the client, or the file simply does not include color resources. These clients draw their color designations from the global color resource file, Colors, located in /usr/lib/X11/sco/startup. This file defines all of the basic color resources a client might need, using the appropriate palette resource variables.

The following example lists the resource settings specified in the Colors file:

   *Background:                 scoBackground
   *Foreground:                 scoForeground
   *topShadowColor:             scoTopShadow
   *bottomShadowColor:          Black
   *activeBackground:           scoActiveBackground
   *activeForeground:           scoActiveForeground
   *activeTopShadowColor:       scoActiveTopShadow
   *activeBottomShadowColor:    Black
   *troughColor:                scoBackground
   *armColor:                   scoHighlight
   *highlightColor:             scoForeground
   *selectColor:                scoForeground
   *borderColor:                Black
For example, if you run the xbiff client, which does not have a resource file, the background of the xbiff window is assigned the color that is linked to the scoBackground palette resource variable. If you are using a palette that sets window backgrounds to steel blue, then the background of the xbiff window is steel blue. If you run the scoedit client, which has a resource file in /usr/lib/X11/app-defaults that sets the *background resource to scoBackground, then the background of the scoedit window is also steel blue.

While the scocolor client is generally the preferred method for customizing colors, there may be occasions where you need to use an actual color value for a resource specification. ``Changing colors for individual users'' explains how to specify color values instead of palette resource variables.


Next topic: Colormaps
Previous topic: The RGB and HSV color models

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003