You can either select colors to display from those available in the RGB database on your system (type showrgb to see list of color names and RGB values), or add custom RGB values to the file /usr/lib/X11/rgb.txt and then recompile the RGB database.
To define a new color in your palette.mac file, use the following format:
COLOR_NAME COLOR_INDEX
Where the COLOR_NAME is a color you have identified from your rgb.txt file, and the COLOR_INDEX is an integer index you assign to the color.
rgb.txt contains these colors (their RGB values precede the color name):
240 230 140 khaki
240 255 255 azure
Add these lines to palette.mac:
khaki 33
azure 34
The default palette.mac file on UNIX/LINUX contains:
Black |
0 |
Indian_red |
9 |
Light_blue |
18 |
sky_blue |
27 |
Red |
1 |
Spring_green |
10 |
Thistle |
19 |
slate_blue |
28 |
Yellow |
2 |
Sea_green |
11 |
steel_blue |
20 |
Medium_blue |
29 |
Green |
3 |
Navy_blue |
12 |
cornflower_blue |
21 |
Firebrick |
30 |
Cyan |
4 |
dark_slate_grey |
13 |
Dark_slate_blue |
22 |
Light_grey |
31 |
Blue |
5 |
Violet |
14 |
Gold |
23 |
Cadet_blue |
32 |
Magenta |
6 |
Wheat |
15 |
Goldenrod |
24 |
|
|
White |
7 |
Grey |
16 |
Dim_grey |
25 |
|
|
Violet_red |
8 |
Orange |
17 |
Navy |
26 |
|
|