From owner-ntemacs-users@june  Fri Nov 15 10:07:03 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" "15" "November" "1996" "11:43:05" "-0500" "James P. G. Sterbenz" "jpgs@acm.org" nil "59" "How to specify numeric color values in _emacs?" "^From:" nil nil "11" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.6/7.2ju) with SMTP id KAA02007 for <voelker@june.cs.washington.edu>; Fri, 15 Nov 1996 10:07:03 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id KAA26344 for <voelker@joker.cs.washington.edu>; Fri, 15 Nov 1996 10:07:01 -0800
Received: from ns.gte.com (ns.gte.com [132.197.8.9]) by june.cs.washington.edu (8.7.6/7.2ju) with ESMTP id IAA26175 for <ntemacs-users@cs.washington.edu>; Fri, 15 Nov 1996 08:41:58 -0800
Received: from colossus.gte.com by ns.gte.com (8.7.5/)
Received: by colossus.gte.com (AIX 3.2/UCB 5.64/4.03)           id AA27557; Fri, 15 Nov 1996 11:43:05 -0500
Message-Id: <9611151643.AA27557@colossus.gte.com>
X-Phone: +1 617 466 2786
X-Url: http://www.ccrc.wustl.edu/~jpgs
X-Pgp: Key 1024/CBBA3CD9  Print = 159533245CE354E1 9C54297E47D71A8C
X-Snail: GTE Laboratories, 40 Sylvan Road MS-47, Waltham MA 02154-1120 USA
Organization: GTE Laboratories
From: "James P.G. Sterbenz" <jpgs@acm.org>
Sender: jpgs@gte.com
To: ntemacs-users@cs.washington.edu
Cc: "James P.G. Sterbenz" <jpgs@gte.com>
Subject: How to specify numeric color values in _emacs?
Date: Fri, 15 Nov 96 11:43:05 -0500


I've just started using a laptop with win95, and am trying to get my
emacs to look as much like my Unix environment as I can.  I can do
things like

(set-foreground-color "cyan")
just fine, but I really want to use rgb values; here is my Unix
.Xdefaults for emacs:

emacs*foreground:                       #90e0ff
emacs*background:                       #003040
emacs*pointerColor:                     #ffffff
emacs*cursorColor:                      #ffffff
emacs.region.attributeForeground:	#ffffff
emacs.region.attributeBackground:	#002838
emacs.modeline.attributeForeground:	#ffffff
emacs.modeline.attributeBackground:	#0080ff
emacs.bold.attributeForeground:		#00ffff
emacs.highlight.attributeForeground:	#ff0000
emacs.secondary-selection:		#ffff00
emacs*menu.popup.font:			Rom11.500
emacs*menu.popup.foreground: 		#00ffff
emacs*menu.popup.background: 		#004060
emacs*menubar.foreground:	 	#00ffff
emacs*menubar.background:	 	#006080
emacs*menubar.buttonForeground: 	#ffffff
emacs*menubar.buttonBackground: 	#0080ff

I've tried various substitutions of the color name using both the
RGB style here (that I've used forever in X) and what I think is
a correct form of the rgb:rrrr/gggg/bbbb with no luck.  I'm sure I'm
just doing something wrong in elisp (at which I'm not very
proficient).  Can anyone give me a working version of

(set-foreground-color "#90e0ff")
or
(set-foreground-color "rgb:90/e0/ff")
or whatever it should be?  Do I have to worry about the number of bits
depending on the display type?

Can I control *other* colors like the region and modeline like I do in
X?  Can I change the colors of the Windows menus? (I expect the answer
is no, but it is worth a try...)


Of course, I looked at the readme, the ntemacs web page, and did a DejaNews
search, but didn't find anything concrete enough to tell me what I'm
doing wrong.


Thanks much in advance,
James



James P.G. Sterbenz            | chair IEEE ComSoc TCGN |     Sr. MTS, GTE Labs
jpgs@{acm|ieee}.org            | PGP  Key ID = CBBA3CD9 |  40 Sylvan Road MS-47
+1 617 466 2786                | print=159533245CE354E1 | Waltham, MA 02254 USA
http://www.ccrc.wustl.edu/~jpgs|       9C54297E47D71A8C |   [opinions are mine]

From owner-ntemacs-users@june  Fri Nov 15 10:36:55 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" "15" "November" "1996" "17:28:38" "GMT" "Andrew Innes" "andrewi@harlequin.co.uk" nil "39" "Re: How to specify numeric color values in _emacs?" "^From:" nil nil "11" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.6/7.2ju) with SMTP id KAA04727 for <voelker@june.cs.washington.edu>; Fri, 15 Nov 1996 10:36:55 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id KAA27372 for <voelker@joker.cs.washington.edu>; Fri, 15 Nov 1996 10:36:54 -0800
Received: from holly.cam.harlequin.co.uk (holly.cam.harlequin.co.uk [193.128.4.58]) by june.cs.washington.edu (8.7.6/7.2ju) with SMTP id JAA29032 for <ntemacs-users@cs.washington.edu>; Fri, 15 Nov 1996 09:29:02 -0800
Received: from propos.long.harlequin.co.uk by holly.cam.harlequin.co.uk; Fri, 15 Nov 1996 17:28:46 GMT
Received: from elan.long.harlequin.co.uk (elan [193.128.93.78]) by propos.long.harlequin.co.uk (8.6.12/8.6.12) with SMTP id RAA14543; Fri, 15 Nov 1996 17:28:38 GMT
Message-Id: <199611151728.RAA14543@propos.long.harlequin.co.uk>
In-Reply-To: <9611151643.AA27557@colossus.gte.com> (jpgs@acm.org)
From: Andrew Innes <andrewi@harlequin.co.uk>
To: jpgs@acm.org
Cc: ntemacs-users@cs.washington.edu, jpgs@gte.com
Subject: Re: How to specify numeric color values in _emacs?
Date: Fri, 15 Nov 1996 17:28:38 GMT

On Fri, 15 Nov 96 11:43:05 -0500, "James P.G. Sterbenz" <jpgs@acm.org> said:
[ .. ]
>I've tried various substitutions of the color name using both the
>RGB style here (that I've used forever in X) and what I think is
>a correct form of the rgb:rrrr/gggg/bbbb with no luck.  I'm sure I'm
>just doing something wrong in elisp (at which I'm not very
>proficient).

You aren't doing anything wrong, it is just that NT Emacs doesn't
recognise #xxxxxx as a literal RGB colour specifier (we can easily add
that for 19.35).  I think under X, it is Xlib that handles that, not
Emacs.

>Can anyone give me a working version of
>
>(set-foreground-color "#90e0ff")
>or
>(set-foreground-color "rgb:90/e0/ff")
>or whatever it should be?  Do I have to worry about the number of bits
>depending on the display type?

You don't need to worry about display type.

As a hack to get this to work, you just need to register "#90e0ff" as a
named colour by adding the cons pair `("#90e0ff" . N)' where N is the
rgb value as a number (9494783 in this case) to `win32-color-map'.

Someone could probably show you how to use defadvise to make this
transparent.

>Can I control *other* colors like the region and modeline like I do in
>X?  Can I change the colors of the Windows menus? (I expect the answer
>is no, but it is worth a try...)

Region and modeline can be customized, but the menu-bar is a standard
Windows one, and is controled by the desktop colour scheme defined in
Control Panel.

AndrewI

From owner-ntemacs-users@june  Fri Nov 15 12:26:28 1996
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" "15" "November" "1996" "14:18:44" "-0500" "James P. G. Sterbenz" "jpgs@acm.org" nil "71" "Re: How to specify numeric color values in _emacs? " "^From:" nil nil "11" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.7.6/7.2ju) with SMTP id MAA17208 for <voelker@june.cs.washington.edu>; Fri, 15 Nov 1996 12:26:28 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id MAA27053 for <voelker@joker.cs.washington.edu>; Fri, 15 Nov 1996 12:26:25 -0800
Received: from ns.gte.com (ns.gte.com [132.197.8.9]) by june.cs.washington.edu (8.7.6/7.2ju) with ESMTP id LAA08219 for <ntemacs-users@cs.washington.edu>; Fri, 15 Nov 1996 11:17:52 -0800
Received: from colossus.gte.com by ns.gte.com (8.7.5/)
Received: by colossus.gte.com (AIX 3.2/UCB 5.64/4.03)           id AA21485; Fri, 15 Nov 1996 14:18:44 -0500
Message-Id: <9611151918.AA21485@colossus.gte.com>
X-Phone: +1 617 466 2786
X-Url: http://www.ccrc.wustl.edu/~jpgs
X-Pgp: Key 1024/CBBA3CD9  Print = 159533245CE354E1 9C54297E47D71A8C
X-Snail: GTE Laboratories, 40 Sylvan Road MS-47, Waltham MA 02154-1120 USA
In-Reply-To: Your message of Fri, 15 Nov 96 17:28:38 +0000.              <199611151728.RAA14543@propos.long.harlequin.co.uk> 
Organization: GTE Laboratories
From: "James P.G. Sterbenz" <jpgs@acm.org>
Sender: jpgs@gte.com
To: Andrew Innes <andrewi@harlequin.co.uk>
Cc: ntemacs-users@cs.washington.edu, jpgs@gte.com
Subject: Re: How to specify numeric color values in _emacs? 
Date: Fri, 15 Nov 96 14:18:44 -0500


Quoth Andrew Innes:

>>Can anyone give me a working version of
>>
>>(set-foreground-color "#90e0ff")
>>or
>>(set-foreground-color "rgb:90/e0/ff")
>>or whatever it should be?  Do I have to worry about the number of bits
>>depending on the display type?

>You don't need to worry about display type.

>As a hack to get this to work, you just need to register "#90e0ff" as a
>named colour by adding the cons pair `("#90e0ff" . N)' where N is the
>rgb value as a number (9494783 in this case) to `win32-color-map'.

OK, works like a charm; thanks!

>Someone could probably show you how to use defadvise to make this
>transparent.

I'm not sure what defadvise *is*, but I don't mind 2 lines per color.

>>Can I control *other* colors like the region and modeline like I do in
>>X?  Can I change the colors of the Windows menus? (I expect the answer
>>is no, but it is worth a try...)

>Region and modeline can be customized,

How can I do this?  There isn't a set-<mumble>-color command for things like
modeline-background, modeline-foreground, 
region-foreground, region-background,
attribute-foreground, attribute-background
Not only isn't it in the manual, but I tried a few obvious
combinations in case they were secret commands.

Can I customise from .emacs using elisp, or does it require a source
code change and rebuild?

>but the menu-bar is a standard
>Windows one, and is controled by the desktop colour scheme defined in
>Control Panel.

I expected this.  Now, if I just could get Windows to use the focus
and raise policy I want, I'd feel better about all this...


Finally, how do I get colors working for various modes?  I currently
use hilit19 under X-windows, and have a customised set of colors for
html mode.  Do (or should) I start using faces?  Or can (should) I just
do

(cond (window-system
       (setq hilit-mode-enable-list  '(not text-mode)
             hilit-background-mode   'light
             hilit-inhibit-hooks     nil
             hilit-inhibit-rebinding nil)

       (require 'hilit19)
       ))

as I do now?  I seem to remember that hilit19 was on the way out.


Thanks much,
James





