Solaris Common Desktop Environment: User's Guide

Color Palettes and Color Flashing

You set your workspace colors through a color palette. The number of colors in the palette is determined by your display type and the Number of Colors selection.

Figure 7-3 Number of Colors Dialog Box

Graphic

Running certain applications may result in a phenomenon know as color flashing or colormap flashing, where the application appears with incorrect colors while the rest of the desktop appears normal, and when given the focus it displays with correct colors but the rest of the desktop does not. Color flashing is typically found in either of the following circumstances.

This is due to fundamental limitations in XWindows when dealing with applications that do not use the default colormap. While you can't use more colors than your display allows, you can reduce the number of colors used by the desktop by choosing a lower-valued color usage in the Number of Colors to Use dialog box, or by exiting other graphics-intensive applications.

For example, if you have a high-color display and have selected More Colors for Desktop but you want to run a color-rich application such as a computer-aided design (CAD) program, you should choose More Colors for Applications or Most Colors for Applications to decrease the number of colors that the desktop uses. The remaining colors are available for the CAD program.

To Overcome Color Flashing

If you have closed all other graphics-intensive applications and your application is still experiencing color flashing, the following procedure may help eliminate the problem.

  1. Open Style Manager.

  2. Click Color.

    The Color dialog box is displayed.

  3. Click Number of Colors.

    The Number of Colors To Use dialog box (see Figure 7-3) is displayed.

  4. Select Most Colors For Applications and click OK.

  5. Click Desktop background and choose a simple workspace background such as Gray Lt.

  6. Make this session your home session by following the procedure in"To Set a Home Sessionkayak".

  7. Exit Style Manager and logout of CDE.

  8. Login to CDE and re-open the application that previously experienced color flashing.

    If the application no longer experiences color flashing, make a note of the current Style Manager settings; if it is still experiencing color flashing, the application has probably specified a list of colormaps to be installed, CDE is only installing the first colormap in this list, so you will need to cycle through the colormaps as explained in the following steps.

  9. Use the following special keyboard keys to cycle through the colormaps.

    Control-L2 (or Control-Again) 

    Steps forward through the colormaps 

    Control-L4 (or Control-Undo) 

    Steps backward through the colormaps 

    Cycling through the colormaps may end up installing the correct colormap, and will not affect the other windows on the desktop in any way. If you continue to experience colormap flashing, have your system administrator seek further information on SunSolveSM.

Running OpenWindows Applications

During startup, dtsession will set *foreground, *background and other OpenWindows global color resources so that OpenWindows applications will be in the same color scheme as CDE applications. You can still control the appearance of their applications by setting application-specific resources; alternatively,, change the palette in Style Manager and restart the OpenWindows application.

Color Buttons

Your display type and the Number of Colors selection determine the number of color buttons that make up a palette. You will have two, four, or eight color buttons in the Color dialog box. The different color buttons in the palette control the colors used for different areas of the screen.

If you have eight color buttons, they will be used as follows (buttons numbered from left to right, top to bottom):

  1. Active window borders

  2. Inactive window borders

  3. Switch for workspace 1 and every fourth additonal workspace (workspace 5, 9, ...)

  4. Text and list areas

  5. Main window background and switch for workspace 2 and every fourth additional workspace (workspace 8, 12, ...)

  6. Dialog box background and menu bar and switch for workspace 3 and every fourth additional workspace (workspace 7, 11, ...)

  7. Switch for workspace 4 and every fourth additional workspace (workspace 6, 10, ...)

  8. Front Panel background

If you have four color buttons, they will be used as follows (buttons numbered from left to right):

  1. Active window borders

  2. Window bodies:

    1. Inactive window borders

    2. Main window and dialog box backgrounds and menu bar

    3. Front Panel background

  3. Workspace switches and backgrounds

  4. Text and list areas

If you have two color buttons, they will be used as follows (buttons numbered from left to right):

  1. Active window borders

  2. Everything else

To Select a Palette

  1. Click the Style Manager Color control.

  2. Select a palette from the Palettes list.

    Graphic
  3. Click OK.

    Workspace colors come from predefined color palettes. The Color dialog box lists the palettes that came with your system plus any palettes you have added.

To Modify an Existing Palette

  1. Click the Style Manager Color control.

  2. Select a palette in the Color dialog box.

  3. Double-click a color button to open the Modify Color dialog box, or click a color button and then click Modify.

  4. Adjust the settings for the level of red, green, blue, brightness, or hue by adjusting the corresponding slider.

    The old and new color samples will be displayed in the upper left corner of the Modify Color dialog box.

  5. Click OK in the Modify Color dialog box.

  6. Repeat steps 2-4 to modify another color button.

  7. Click OK in the Color dialog box.

To Grab a Color from the Workspace

  1. Click the Style Manager Color control.

  2. Select a palette in the Color dialog box.

  3. Double-click a color button to open the Modify Color dialog box, or click a color button and then click Modify.

  4. Click Grab Color to display the grab pointer.

  5. Move the pointer to an area of color on the screen that you want to grab.

  6. Click to make that color the new color.


    Note -

    This causes the desktop to use one more color so applications have one fewer color available to them.


To Create a Custom Palette

You can create your own palette by copying and modifying an existing palette.

  1. Click the Style Manager Color control.

  2. Choose Add in the Color dialog box.

  3. Type the new palette name and click OK in the Add Palette dialog box.

  4. Modify the palette.

  5. Click OK in the Color dialog box.

    Adding a palette makes a copy of the currently selected palette with a unique name. You then create your custom palette by modifying the copy and the original palette is not changed.

To Delete a Palette

  1. Click the Style Manager Color control.

  2. Select the palette from the Palettes list.

  3. Click Delete.

  4. Click OK in the Delete Palette dialog box.

    When you delete a palette, Style Manager prefixes the name of the palette with a ~ and stores a copy in the HomeDirectory/.dt/palettes directory.

To Restore a Deleted Palette

  1. Open a File Manager view showing HomeDirectory/.dt/palettes.

  2. For system-supplied palettes, delete the file ~palette_name.dp.

    For user-added palettes, rename the deleted palette from ~palette_name.dp to palette_name.dp.

  3. Restart Style Manager (close, then reopen).

To Change the Number of Colors Used by the Desktop

  1. Click the Style Manager Color control.

  2. Click Number of Colors in the Color dialog box.

  3. Select an option to set the number of colors used by the desktop.

    See "Color Palettes and Color Flashing".

  4. Click OK.

    You must log out and back in for the change to take effect.