bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

set-background-color


From: Dan Jacobson
Subject: set-background-color
Date: 17 Feb 2002 10:38:12 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

1. Didn't see error message: doing
$ emacs -q -nw -bg '#139  69  19' #[yes, knowing that it will fail]
starts an emacs with apparently no problems.  it is only when one
purposely checks *Messages* buffer does one see
"Unable to load color "#139  69  19" [10 times]"

2. in Info we see
     COLOR can be an X-style `"#XXXYYYZZZ"' specification instead of an
     actual name.  The format `"RGB:XX/YY/ZZ"' is also supported.
Problems: A. this is noted in the context of -nw... one would wonder
 if they are applicable to non -nw.
          B. no models or place to get the color numbers are
     mentioned.  I found /usr/X11R6/lib/X11/rgb.txt ... it should be
     mentioned explicitly if one is supposed to use 0 padded decimal
     values or hex values... by the way, doing M-x
     set-background-color #.... is not on its completion list thus
     won't be allowed to be typed.

D>  (set-background-color "chocolate4") doesn't work for emacs -nw on rxvt.
E> How do you mean ``doesn't work''?  What happens if you try?

ok, firstly, it wont let me type in chocolate4, so I picked magenta.
All went well except my terminal didn't change color.

If I do ESC :  (set-background-color "chocolate4") nothing happens
either, I just see a "nil" returned.  By the way, TERM=rxvt
COLORTERM=rxvt-xpm

K> Hm.  Does it work for some other colors, such as black or white?

No, after I start a emacs -q -nw, any M-x set-background-color do not
change the background color.  I am using a black background rxvt that
displays big5 chinese... there is a possibility that the guys who
added big5 hurt something, just in case you dont have these problems.

E> Does it work to say "emacs -nw -bg chocolate4"?

Yes [startled] this works.  It maps to some kind of red, but at least
it does something.

By the way,
$ emacs -q -nw -bg '#111111111'
$ emacs -q -nw -bg '#111111'  
$ emacs -q -nw -bg '#000000'  
make an emacs without a contrasting modeline bar.

Anyways, Info should mention if this is the right way to get the hex
values on needs to start adjusting colors with, e.g.,

$ awk /Pink/'{printf "%02x%02x%02x %s\n", $1,$2,$3,$4}' 
/usr/X11R6/lib/X11/rgb.txt

Also Info should say "What to do if you feel a color is too dark or
light, and want to fine tune it, finding no better color from
list-colors-display [which doesn't show their #AAAAAA values [why
not?]]..."

How about some new functions: darken and lighten, for those of use who
dont know how to do it with adjustments to (set-background-color
"#8b6a62") [yes, in the non -nw case this works, however one cannot do
M-x set-background-color, one must do M-: , as # is not allowed.]

Me: to achieve my goal of knowing which windows are root,
I will now use
alias sukonsole='(konsole -bg hotpink4 -e su&)'
as this will get the whole terminal window, including any emacs -nw.

For the non -nw cases, I will use
(and(eq window-system 'x)(= 0(user-uid))(set-background-color "chocolate4"))
[Anyways, I want a slightly different color for root's emacs vs. emacs -nw]

OK, so what do I want?  OK, I wish info would tell us how to make
chocolate4 just a little darker.
-- 
http://www.geocities.com/jidanni/ Taiwan(04)25854780



reply via email to

[Prev in Thread] Current Thread [Next in Thread]