> It seems that I can only use quite limited set of colors. Can you tell > me how I can use more colors?
> It seems that I can only use quite limited set of colors. Can you tell > me how I can use more colors?
You don't mention what hardware or software you are using, so guessing that you have a Sun workstation of some kind, I suggest you trawl the archives for "framebuffer" and take a look at the man pages for m64config or a similar command, depending on your framebuffer type.
This will show you how to change your video setting, such as resolution, refresh rate and colour depth.
For now, I'll take a stab and guess that you are using netscape. If so, you should either start netscape after you've started all other clients, so they'll have first grabs on the colour map, or run netscape with the "-install" option and live with the colour switching.
If you give some more information, we may be able to help more.
Andrew J. Caines
Have you used xdpyinfo to verify that your hardware is capable of greater than 8bit colordepth? Is you're running older hardware, it probably isn't. If you're running a newer Sun, "man -k fbconfig" might be helpful.
If it's not hardware, it's probably software :-). Some applications, like Netscape, are notorious for hogging the colormap. Read the man pages for an "owncmap" flag to tell those apps to ask for a private colormap.
Paul R. Joslin
> I tried to apropos owncmap, search for it in xterm man pages... etc, but still > can't find it. So, please can somebody tell me how I can setup applications > that hog the colormap to use their own private colormap? thanks!
There is no 'global' option for telling a X11 application to use its own colormap (cf. X11(7)). Unfortunately every program uses a different commandline switch for this purpose. For netscape it is '-install'.
Carsten
xmag
color_name.tk
color_rgb.tk
(set-face-foreground 'font-lock-string-face "Plum")
Newsgroups: comp.unix.questions Date: 2000/08/14
>Is there a way that I can know the foreground and background color >of a specific xterm window?
Try xmag.
Quoting from the first paragraph of it description: The xmag program allows you to magnify portions of an X screen.
[snip] Pressing Button1 in the enlargement window shows the posi- tion and RGB value of the pixel under the pointer until the button is released.
Ken Pizzini
> Try xmag...
Thanks Ken, you're really helpful.
As for the default xterm "gray" background color, in case anyone else wants to know, it is aeb2c3. try this:
xterm -bg \#aeb2c3 &
T
The Xwin comes with a predefined set of colors, liseted in the file rgb.txt
rgb uses the default color name database of usr/openwin/lib/X11/rgb.txt to builds a color name database in dbm format.
! $XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp $ 255 250 250 snow 248 248 255 ghost white 248 248 255 GhostWhite 245 245 245 white smoke 245 245 245 WhiteSmoke 220 220 220 gainsboro 255 250 240 floral white 255 250 240 FloralWhite 253 245 230 old lace 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789 1 2 3 4 5 6 7
— same version as that of openwin
$ head /usr/openwin/lib/X11/rgb.txt ! $XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp $ 255 250 250 snow 248 248 255 ghost white ...
ls /usr/X11R6/lib/X11/rgb.txt head !$ | cut -f 3 | tail +2
![]() |
!! |
Found that each multi-word color have a corresponding one-word color version
$ grep '[[:alnum:]] [[:alnum:]]' -A 1 /usr/X11R6/lib/X11/rgb.txt | less 248 248 255 ghost white 248 248 255 GhostWhite 245 245 245 white smoke 245 245 245 WhiteSmoke 220 220 220 gainsboro 255 250 240 floral white 255 250 240 FloralWhite 253 245 230 old lace 253 245 230 OldLace 250 240 230 linen 250 235 215 antique white 250 235 215 AntiqueWhite 255 239 213 papaya whip 255 239 213 PapayaWhip 255 235 205 blanched almond 255 235 205 BlanchedAlmond 255 228 196 bisque 255 218 185 peach puff 255 218 185 PeachPuff 255 222 173 navajo white 255 222 173 NavajoWhite
awk 'NF==4 {print }' < /usr/openwin/lib/X11/rgb.txt
— print all one-word-version-of colors
awk 'NF==4 {print $4}' < /usr/openwin/lib/X11/rgb.txt awk 'NF==4 {printf $4 " "}' < /usr/openwin/lib/X11/rgb.txt
— print all one-word-version-of color names only
ls /usr/X11R6/lib/X11/rgb.txt head !$ | grep -iv grey | awk 'NF==4 {printf $4 " "}' | fold -s -w 72 | ssur '\\' | sed 's/"\\/" \\/g' ^head^cat^ | xsel -c
— grey is just synonym of gray
awk 'NF==4 {printf "'\''#%02x%02x%02x'\'' %s\n", $1, $2, $3, $4 }' < /usr/openwin/lib/X11/rgb.txt
— print all one-word-version-of color and its correspondent hex value
AntiqueWhite PapayaWhip cornsilk CornflowerBlue SlateBlue RoyalBlue DodgerBlue DeepSkyBlue SkyBlue SteelBlue LightBlue CadetBlue MediumAquamarine SeaGreen MediumSeaGreen LightSeaGreen goldenrod DarkGoldenrod RosyBrown IndianRed SandyBrown DarkSalmon LightCoral maroon MediumVioletRed plum