| United States-English |
|
|
|
![]() |
Common Desktop Environment: Advanced User's and System Administrator's Guide > Chapter 15 Administering
Application Resources, Fonts, and ColorsAdministering Colors |
|
This section describes:
A palette consists a group of color sets. The color sets for the current palette are shown in the Style Manager Color dialog box A file exists for each palette. The paletteDirectories resource specifies the directories containing palette files. By default, this resource contains:
Each color set in the current palette is represented by a color button in the Style Manager Color dialog box. Each color is identified by a color set ID—a number from 1 to 8. Each color set is composed of up to five colors. Each color button displays the background color of the color set. The five colors in each color set represent the following display component resources:
The number of color sets used by each palette is determined by the colorUse resource, which the user can set using the Style Manager Number of Colors To Use dialog box. Style Manager uses RGB values when writing color information to its palette files. The syntax for RGB numbers is:
Red, Green, and Blue are hexadecimal numbers, each 1 to 4 digits long, that indicate the amount of that color used. There must be the same number of digits for each of the colors. Thus, valid color values consist of 3, 6, 9, or 12 hexadecimal digits. For example, white can be specified in any of the following ways:
If you set a color resource directly, you can use either the
color name or RGB value. The file /usr/lib/X11/ The desktop maps color sets to various display elements through resources, and makes the following assignments:
These resources take a color set ID as their value. Coloring display elements with color set IDs allows the element to dynamically change to the new color scheme when a new palette is selected with Style Manager. You can use these resources for individual applications. For example, the following line shows how you would visually group all dtterm windows by using color set 8 for their primary color.
The color set IDs used for display elements depends on the Number of Colors setting in Style Manager:
You can dynamically change color for desktop applications and other cooperating applications through Style Manager. The foreground and background colors set by Style Manager are available to non-cooperating applications.
The number of colors used by Style Manager depends on the values for the following resources:
Table 15-5 “Number of Desktop Colors” lists the maximum number of colors allocated by the desktop. Table 15-5 Number of Desktop Colors
To determine the maximum number of colors:
However, with the following configuration you would only have ten colors in your palette: four color sets times two colors in each set (background and selectColor) plus black and white:
The default value of the colorUse resource is MEDIUM_COLOR. The value of this resource affects the number of color sets used in a palette. Other resources affect the number of colors used to make shadows. The value of the colorUse resource also affects the use of multi-color icons.
The shadowPixmaps resource directs the desktop to replace the two shadow colors with pixmaps. These pixmaps mix the background color with black or white to simulate top or bottom shadow values. This reduces the number of needed colors by two, since color cells do not need to be allocated for the shadow colors.
The default value for shadowPixmaps depends on the colorUse resource you have and the hardware support for the display. The foregroundColor resource specifies how the foreground is configured in a palette.
If foregroundColor is set to either Black or White, the number of colors in the color set is reduced by one, and the foreground will not change in response to changes in the background color. The default value for foregroundColor is Dynamic, except where the value of colorUse is B_W. The dynamicColor resource controls whether applications change color dynamically; that is, whether the clients change color when you switch palettes.
When the value of the dynamicColor resource is True, clients that cannot change colors dynamically (non-Motif applications) allocate different cells in the color map than clients that can change colors dynamically, even if you see the same color.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||