DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

scocolor(XC)


scocolor -- changes window colors

Command syntax

scocolor [Xt_options]

Desktop syntax

Double-click on the Color icon in the Preferences Editor in the Controls window.

Description

The colors for the frames and backgrounds of the windows are defined by the current color palette. This palette assigns specific colors to the window components, including backgrounds, text, frame shadows, scrollbar troughs, and highlighting. The clients or applications running inside the windows may also support the current palette (see ``Applications support'' below).

The use of a common palette ensures a unified look and facilitates color-coded identification of the active window (the one with the input focus).

You can customize the colors by changing the current palette with scocolor. You can select predefined palettes from a list or create your own palettes. Special palettes are provided to support grayscale monitors and DOS programs.

Command options

scocolor supports the standard Xt options.

Desktop options

When invoked, Color displays a palette selection panel, from which you can select, add, delete, and edit palettes. If you choose to edit a palette, a color selection panel pops up. The color selection panel is modeless to facilitate editing (you can keep both panels up and move back and forth between them). The name of the palette being edited appears at the top of the color selection panel.

The following sections describe the selection panels.

Palette selection panel

The palette selection panel contains the following options:

Select palette
Clicking on a palette name in the list makes it the current palette. All windows will immediately take on the colors of that palette.

Add palette
Add palette creates a new palette with the colors of the current palette. You are prompted for a palette name.

Delete palette
Delete palette removes a selected palette from the list. Only user-defined palettes can be deleted; selecting one of the palettes supplied with SCO OpenServer disables the Delete palette button. Select Cancel to restore the deleted palettes.

Edit palette
The color buttons to the right of the palette list define the component colors of the selected palette. Clicking on one of these buttons brings up the color selection panel, from which a new color can be assigned to the window element represented by the button.

The window with the input focus is identified with the ``Active window,'' ``Active foreground'' and ``Active top shadow'' colors. The Desktop and scrollbar and slider control troughs use the ``Alternate background'' color. When clicked on, buttons are outlined with the ``Highlight'' color. The bottom shadows are always black. Text appears in the ``Foreground'' color.

Only user-defined palettes can be edited with Color. Color prompts for a new palette name if the user attempts to save changes to one of the palettes supplied with SCO OpenServer. The new palette inherits the colors of the supplied palette, along with the user's changes.

Color selection panel

The color selection panel contains the following options:

Select color
Clicking on a color name in the list temporarily adds it to the current palette. All windows immediately reflect the change. Apply or OK saves the change; the former leaves the color selection panel up for additional editing; the latter closes the panel.

Mix color
Instead of selecting colors from the list, the user can mix colors with the slider controls. The color is displayed as it is mixed, and can be saved as part of a user-defined palette with Apply or OK. Mixed colors cannot be assigned names. Numbers above each slider indicate the precise position of the slider.

Color model
The Color model button above the mixing sliders allows the user to choose between an RGB color model (in which the sliders control the amount of red, green, or blue) or an HSV color model (in which the sliders control hue, saturation, and value). RGB is the default.

Hardware support

scocolor requires an X server that supports at least 16 colors or grayscales. Only PseudoColor and grayscale visual X servers are supported.

Video graphics cards which do not support high resolution color may change color in steps, rather than smoothly, when color mixing sliders are moved.

Color palettes are automatically mapped to grayscale monitors. Because this might not always yield optimal results, several grayscale palettes are provided.

On X servers which only support 16 colors (or grayscales), DOS programs using the DOS Services may produce unreadable screens or distorted colors. This will not occur if the server supports 256 colors, if the DOS window is zoomed to fill the whole screen, or if the supplied ``DOS Primary Colors'' palette is selected.

Applications support

The colors of all SCO OpenServer window frames and backgrounds are defined by the current palette, regardless of whether the application running inside a window supports the SCO OpenServer palette mechanism.

For an application to support SCO OpenServer palettes inside its window, it must replace actual color names with the palette resource variable, and it must be compiled with version 4.0 (or later) of the SCO Development System. The palette resource variables are:

scoBackground
scoAltBackground
scoForeground
scoTopShadow
scoActiveBackground
scoActiveForeground
scoActiveTopShadow
scoHighlight

The user-configurable colors are limited to eight because SCO OpenServer must run on 16-color (or grayscale) servers. SCO OpenServer applications that make use of additional colors must observe the same limitation. Because the palette manager allocates eight color cells and the server takes two more (black and white), six color cells are available for applications on a 16-color server, and 246 are available on a 256-color server.

Limitations

Unsupported display

If the Color control is invoked on an X server that supports less than 16 colors or grayscales, or on an unsupported visual X server, this error message displays: The Color control will not work with this display.

No palette daemon

scosession must be running before you start Color. In addition, the scosession resource, enablePalette, must be set to True. If either of these conditions is not satisfied, this error message displays: Color palette daemon not installed.

Palette name too long

If a user attempts to enter a palette name longer than 80 characters, Color will beep and refuse to accept more characters.

Duplicate palette name

If a user enters a name for a new palette which is identical to the name of an existing palette, this error message displays: There already is a palette with that name.

Editing supplied palette

The palettes supplied with SCO OpenServer cannot be edited by users. If a user attempts to change a color in one of the supplied palettes, the user will be asked for a name for a new palette. The new palette will inherit the colors of the supplied palette, along with the user's changes.

Resources

You can customize the characteristics of scocolor using your personal X resource file, $HOME/.Xdefaults-hostname, where hostname is the name of the machine on which the client is running. If this file does not exist in your home directory, you will need to create it. Changes made to this file take effect the next time you run scocolor.

In addition to recognizing the core resource names and classes, scocolor defines the following application-specific resources:


title
specifies the palette selection panel title. The default is Color.

pal_label.labelString
specifies the label above the color buttons. The default is Current colors.

palette_item1*labelString
specifies the label for the background color button. The default is Background.

palette_item7*labelString
specifies the label for the alternate background color button. The default is Alternate background.

palette_item2*labelString
specifies the label for the foreground color button. The default is Foreground.

palette_item3*labelString
specifies the label for the top shadow color button. The default is Top shadow.

palette_item4*labelString
specifies the label for the active window frame color button. The default is Active window.

palette_item5*labelString
specifies the label for the active window foreground color button. The default is Active foreground.

palette_item6*labelString
specifies the label for the active window top shadow color button. The default is Active top shadow.

palette_item8*labelString
specifies the label for the highlight color button. The default is Highlight.

editor_form.label.labelString
specifies the label above the color list. The default is Select color.

model_menu*labelString
specifies the color model button label. The default is Color model:.

newpal_form.label.labelString
specifies the message for the new palette dialog box. The default is Enter a name for the new palette:

exists_form*messageString
specifies the message for the duplicate palette name dialog box. The default is There already is a palette with that name.

notPseudo
specifies the message for the unsupported visual X server dialog box. The default is The Color control will not work with this display.

sess_error
specifies the message for the no palette daemon dialog box. The default is Color palette daemon not installed.

questionLabel.labelString
specifies the message for the cancel after changes dialog box. The default is Discard changes?.

systemFile
looks up database of palettes, first in /usr/lib/X11/[$LANG]/sco/ScoColor/palettes and then, if palettes does not exist, searches in /usr/lib/X11/sco/ScoColor/palettes.

rgbDatabase
looks up the database for rgb, searching first in /usr/lib/X11/[$LANG]/rgb.txt and then, if rgb.txt does not exist, searching in /usr/lib/X11/rgb.txt.

saveFile
saves all of the palettes that you create in $HOME/.odtpref/[codeset]/palettes, which represents a code-specific directory. For example, a palette created in English using the ascii code set would be saved in $HOME/.odtpref/ascii/palettes.

See also

scosession(XC), Xt_options(XC)


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