Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xinitcolorm(1) — HP-UX 8.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XINITCOLORMAP(1)

NAME

xinitcolormap − initialize the X colormap

SYNOPSIS

xinitcolormap [options]

DESCRIPTION

This program is used to initialize the X colormap.  Specific X colormap entries (pixel values) are made to correspond to specified colors.  An initialized colormap is required by applications that assume a predefined colormap (e.g., many applications that use Starbase graphics). 

xinitcolormap reads a colormap file to determine the allocation of colors in the X colormap.  The name of the colormap file is determined by using (in the following order) the command line option [-f colormapfile], the .Colormap X default value or /usr/lib/X11/xcolormap.  If a colormap file is not found, then the following default colormap specification is assumed. 

black (colormap entry 0)
white
red
yellow
green
cyan
blue
magenta (colormap entry 7)

xinitcolormap uses the XStoreColor and XAllocColor libX11.a calls to initialize the X colormap.  The xinitcolormap program should be the first X client program run when the X Window System is started in order to assure that X colormap entries have the color associations specified in the colormap file.  This could be done by running xinitcolormap as the first X client program in the .x11start file.  Once xinitcolormap has been run, an X client program can use the initialized colors. 

A colormap file is made up of lines of the form:

color

color is a one or two word color name (refer to the names in the file /usr/lib/X11/rgb.txt), or optionally an initial sharp character followed by a numeric RGB specification (as used by the libX.a call XParseColor).  The line number of a color specification in the colormap file determines the index of the color in the X colormap.  Colors in the colormap file, for colormap entry 0 up to the last colormap entry to be initialized, must be specified.  There should be no extra (blank or comment) lines in the colormap file.  The first two entries in the colormap file must be black and white.  Also, a color may be specified more than once in the colormap file. 

OPTIONS

-f colormapfile
Specifies the file containing the colormap.

-display display
Specifies the server to connect to; See X(1) for details. 

-c count If count is specified then only the first count colors from the colormap file will be used in initializing the X colormap. 

-p If the -p option is specified then the colormap file will be checked for proper syntax, but the X colormap will not be initialized. 

-k[ill] If the -k[ill] option is specified, then the colormap entries allocated by a previous run of xinitcolormap will be deallocated and the colormap will not be re-initialized. All other options will be ignored except -display display. 

NOTES

xinitcolormap will only initialize the default colormap of the root window.  xinitcolormap assumes the first two colors specified are black and white.  xinitcolormap should not be run in the background.  The X colormap is fully initialized only when xinitcolormap returns.  Running xinitcolormap a second time after X is started will deallocate those colors allocated by a previous run and attempt to allocate a new colormap using the new specifications. If other clients have allocated color cells that conflict with the new specifications, xinitcolormap will fail and the colormap will remain un-allocated.  The file /etc/newconfig/xcolormap is a  sample colormap file that corresponds to the Starbase default 256 entry colormap.  The [-c count] option can be used to select a subset of the colors in this colormap file for initializing colormaps with up to 256 entries.  xinitcolormap uses XSetCloseDownMode with RetainPermanent to prevent the deallocation of the colormap. This means that xinitcolormap no longer spawns a daemon, and the only way for the user to be sure that xinitcolormap succeeded is to view the messages (or lack of) produced by xinitcolormap. If x11start is used, the output should be redirected from xinitcolormap to a log file.  xinitcolormap will not work on TrueColor visuals. 

FILES

/usr/lib/X11/xcolormap
/usr/lib/X11/rgb.txt
/etc/newconfig/xcolormap
 .x11start
 

Hewlett-Packard Company  —  HP-UX Release 8.0: Nov 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026