Changing colors

Changing colors in an existing palette

You can change the colors in any existing palette so that the color schemes of the palettes better suit the needs of your users. You must be logged onto the system as root to perform this task.

To change a color in an existing palette, perform the following steps.

  1. Select the color(s) that you want to replace the color settings in the palette. Use one of the following methods to aid your choice:

  2. In the system palettes file in /usr/lib/X11/sco/ScoColor, locate the line that corresponds to the color you want to change and replace it with the RGB values for the new color.

Step 1: Selecting a replacement color

The scocolor client is an excellent tool for previewing different colors and determining how they actually appear on your monitor. The Red, Green, and Blue decimal values that are displayed above the RGB slider bars correspond directly to the RGB values for the colors in the database.

When you decide on a particular color, note the RGB decimal values for the color. You need to specify these values to replace the old color.

A quicker way to determine the RGB values for a color is to examine the rgb.txt file in /usr/lib/X11. This approach is most useful if you already know the color that you want to use but do not know the color's RGB values.

NOTE: Choosing a color from the rgb.txt file based simply on the color's name may result in a disappointing appearance. Because of differences in graphics adapters and monitors, colors are not always reproduced in the way you might expect. For example, a color named Lemon Chiffon might seem more beige than yellow on some displays.

Step 2: Adding the new color to the palette

All of the default, system-wide palettes are located in the palettes file in /usr/lib/X11/sco/ScoColor. Palette definitions in this file consist of nine lines of information. The following example shows the definition for the Tropics palette and a description of each line in the definition:

Tropics     Name of palette
62 243 220 Background color (RGB values)
0 52 44 Foreground color (RGB values)
188 255 247 Top shadow color (RGB values)
255 255 0 Active background color (RGB values)
0 71 67 Active foreground color (RGB values)
255 255 255 Active top shadow color (RGB values)
255 124 171 Alternate background color (RGB values)
233 160 106 Highlight color (RGB values)
Locate the section that defines the palette you want to modify. Then replace the line that contains the color you want to change with the RGB values for your new color choice. Use tabs to separate the three columns.

NOTE: You cannot comment out lines within a palette definition. If more than nine lines exist for a palette, scocolor cannot access any of the palettes that follow the altered palette definition.

If you want to save a copy of a default palette before altering it, either make a backup copy of the palettes file or create a new palette, based on the default palette, from within scocolor.

Next topic: Creating a new system-wide palette
Previous topic: Changing colors for the entire system

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