Xcolors(5) —
NAME
Xcolors − X Window System color specification file
DESCRIPTION
The file /usr/lib/X11/Xcolors is used at runtime by the X(1) server when a static colormap is being simulated on a server that supports dynamic colormaps. It allows specification of the colors that should be supplied in the static colormap. For example, if the default visual type in the file /usr/lib/X11/Xconfig were specified to be StaticColor, for a VGA display, the Xcolors file could be used to specify the 16 colors that are to be provided by the colormap.
This is useful mainly on displays supporting small colormaps because when a static colormap is used, the X server will always return the closest match when a color is allocated. (In contrast, with a dynamic colormap, if the color requested cannot be allocated, the server sends the application an error. Many applications are not prepared to deal with such errors because they erroneously assume that a “color” display will have at least 256 colors available.)
The Xcolors file is made up of sections, each describing a colormap. There may be multiple colormaps defined in the file; however for any combination of a display, visual type, and colormap size, there may be only one colormap defined.
The first line of a colormap definition should consist of four fields and be of the form:
| colormap | Type | Display | Size |
Subsequent lines should be in the form of either a single field with the name of a color, or three fields specifying the red, green, and blue components of a color. These fields are separated by commas. The number of colors specified should match the size specified in the first line of the section.
A ‘#’ character begins a comment; characters to the end of the line will be ignored. Unused fields must be accounted for; null (dummy) fields such as "" or ” can be used. An entire section will be ignored if the first line is commented out.
The following example defines a StaticColor colormap with 16 colors:
| #colormap | Type | Display | Size |
| colormap | StaticColor | 0.0 | 16 |
| black, | # black | ||
| white, | # white | ||
| 0x2000, | 0x2000, | 0x8C00, | # navy blue |
| 0x0000, | 0x7C00, | 0xFC00, | # "true blue" |
| 0xA000, | 0xE000, | 0xFC00, | # lightish blue |
| 0x0000, | 0xFC00, | 0xFC00, | # cyan |
| 0x2000, | 0x8C00, | 0x2000, | # forest green |
| 0x3800, | 0xDC00, | 0x3800, | # lime green |
| 0x2000, | 0xFC00, | 0x8C00, | # pale green |
| 0xAAAA, | 0x5555, | 0x0000, | # brown |
| 0xFC00, | 0x7C00, | 0x0000, | # coral |
| 0xF800, | 0xF800, | 0x0000, | # yellow |
| 0x9800, | 0x3000, | 0xC000, | # purplish |
| 0xFC00, | 0x0000, | 0xFC00, | # magenta |
| grey, | # grey | ||
| red, | # red |
FILES
/usr/lib/X11/Xcolors
SEE ALSO
X(1), Xcpqag(1), Xcvc(1), Xdcaga(1), Xgp(1), Xhrc(1), Xigsp(1), Xlvp(1), Xmsfdp(1), Xnnp(1), Xnnpi(1), Xpw(1), Xrren2(1) Xserver(1), Xsp200(1), Xtisdb(1), Xv256(1), Xvga(1), Xviking(1), Xwge(1), Xconfig(5).
\*U — Version 1.0