Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Number of Colors Used by Style Manager

The number of colors used by Style Manager depends on the values for the following resources:

colorUse--configures the number of colors the desktop uses

shadowPixmaps--directs the desktop to replace the two shadow colors with pixmaps

foregroundColor--specifies if the foreground color changes dynamically

dynamicColor--controls whether applications change color when you switch palettes

Table 17-9 lists the maximum number of colors allocated by the desktop.

Table 17-9 Number of Desktop Colors

Display 

Maximum Number of Colors 

Number Derived From 

B_W 

Black and white 

LOW_COLOR 

12 

Two color sets times five colors plus black and white 

MEDIUM_COLOR 

22  

Four color sets times five colors plus black and white 

HIGH_COLOR 

42 

Eight color sets times five colors plus black and white 

To determine the maximum number of colors:

  1. Multiply the number of color sets in the palette by the number of colors within each color set.

  2. Add 2 (for black and white).

    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:

    *colorUse:	MEDIUM_COLOR
    *shadowPixmaps: 	True
    *foregroundColor:	White

    Note -

    Multi-color icons use fourteen additional colors.


colorUse Resource

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.

Value 

Description 

B_W 

"Black and White" Style Manager setting Displays with 1 to 3 color planes Number of color sets: 2 Maximum number of colors: 2 Default number of colors: 2 No multicolor icons 

LOW_COLOR 

"Most Color for Applications" Style Manager setting Displays with 4 to 5 color planes Number of color sets: 2 Maximum number of colors: 12 Default number of colors: 12 No multicolor icons 

MEDIUM_COLOR 

"More Colors for Application" Style Manager setting Displays with 6 color planes Number of color sets: 4 Maximum number of colors: 22 Default number of colors: 22 Multicolor icons 

HIGH_COLOR 

"More Colors for Desktop" Style Manager setting Displays with 7 or more color planes Number of color sets: 8 Maximum number of colors: 42 Default number of colors: 42 Multicolor icons 

default 

The desktop chooses the correct value for that display. (To reduce the number of colors used by the desktop for high-color displays, the default colorUse resource is set to MEDIUM_COLOR.)

shadowPixmaps Resource

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.

Value 

Description 

True 

The desktop creates a topShadowPixmap and bottomShadowPixmap to use instead of the shadow colors.

False 

topShadowColor and bottomShadowColor from the palette are used.

The default value for shadowPixmaps depends on the colorUse resource you have and the hardware support for the display.

foregroundColor Resource

The foregroundColor resource specifies how the foreground is configured in a palette.

Setting 

Result 

White 

Foreground is set to white. 

Black 

Foreground is set to black. 

Dynamic (Default) 

Foreground is dynamically set to black or white, depending on the value of background. For instance, white letters on a yellow background are difficult to read, so the system chooses black.

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.

dynamicColor Resource

The dynamicColor resource controls whether applications change color dynamically; that is, whether the clients change color when you switch palettes.

Value 

Description 

True 

Clients change color dynamically when a new palette is selected. This is the default value. 

False 

Clients do not change color dynamically. When a new palette is selected, clients will use the new colors when the session is restarted. 

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.


Note -

Since all clients can share the same color cells, setting dynamicColor to False reduces the number of colors your desktop consumes.