rgb(X)
rgb --
color database compiler
Syntax
rgb [database_name] < color_text_file
Description
The rgb program compiles a color database for the X server.
color_text_file is the pathname of the text file that
describes the names and RGB values for
the colors the Xserver will recognize.
Usually, /usr/lib/X11/rgb.txt is used as the color text file.
If database_name is omitted, rgb
generates two database files, /usr/lib/X11/rgb.dir and
/usr/lib/X11/rgb.pag.
If these two datafiles already exist, rgb checks the inputfile
rgb.txt for colors that are not yet stored in the datafiles
and appends these colors to rgb.dir and rgb.pag.
Options
database_name is an alternative database
name that can include a path.
If database_name is specified,
database_name.dir and
database_name.pag
are used instead of the default color database files,
/usr/lib/X11/rgb.dir and /usr/lib/X11/rgb.pag.
Color database files store the names of colors available
to the X server and the corresponding RGB values.
By default the X server, Xsco,
reads /usr/lib/X11/rgb.dir and rgb.pag.
If you run rgb with the database_name option,
to create an alternative color database,
you must instruct the server to read the
alternative database files by running
Xsco with the -fr option.
Most SCO OpenServer systems start Xsco
from the startx script, but you can
pass the -fr option to Xsco
through with the following command line:
startx -- -fr database_name
Color text file format
Each line of the color_text_file
file consists of three color values and a color name. The
color values are decimal numbers from 0 to 255 for the red,
green, and blue (``RGB'') components of the color.
The following is a typical entry:
35 35 142 Navy Blue
This entry defines ``Navy Blue'' as consisting of 35/255ths of
the maximum possible intensity of red, 35/255ths of the
maximum possible intensity of green, and 142/255ths of the
maximum possible intensity of blue.
The server is case-insensitive when searching for color names, so
``navy blue'' or ``Navy BLUE'' finds the entry above, for example.
The server is sensitive to spaces in color names, so
it does not equate ``Navy BLUE'' and ``NavyBLUE.''
Remember that
the exact same color values may not produce the exact same
shade of that color on different graphics adapters or monitors.
To activate changes to rgb.txt,
you must recompile the color database with rgb
and restart the server.
Files
/usr/lib/X11/rgb.txt
See also
showrgb(X),
Xsco(X)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003