Discussion:
How do I tell Emacs that my background is white (tty)?
(too old to reply)
Fredrik Staxeng
2012-09-13 15:36:00 UTC
Permalink
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I tell
Emacs that my backgroud is white?
--
Fredrik Stax\"ang | rot13: ***@hcqngr.hh.fr
This is all you need to know about vi: ESC : q ! RET
Ellen Taylor
2012-09-14 19:31:45 UTC
Permalink
Post by Fredrik Staxeng
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I tell
Emacs that my backgroud is white?
Just tell Emacs to use black as the foreground color using 'set-foreground-color'.
Fredrik Staxeng
2012-09-15 05:27:27 UTC
Permalink
Post by Ellen Taylor
Post by Fredrik Staxeng
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I tell
Emacs that my backgroud is white?
Just tell Emacs to use black as the foreground color using 'set-foreground-color'.
Thank you for taking time to reply, but unfortunately emacs still uses
yellow foreground. I tried to find out how many colors emacs thinks my
xterm has, but (terminal-parameters) doesn't say, and (frame-parameters)
gets truncated.
--
Fredrik Stax\"ang | rot13: ***@hcqngr.hh.fr
This is all you need to know about vi: ESC : q ! RET
Fredrik Staxeng
2012-09-15 05:55:42 UTC
Permalink
Post by Fredrik Staxeng
Post by Ellen Taylor
Post by Fredrik Staxeng
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I tell
Emacs that my backgroud is white?
Just tell Emacs to use black as the foreground color using 'set-foreground-color'.
Thank you for taking time to reply, but unfortunately emacs still uses
yellow foreground. I tried to find out how many colors emacs thinks my
xterm has, but (terminal-parameters) doesn't say, and (frame-parameters)
gets truncated.
It seems that using (set-terminal-parameter nil 'background-mode 'light)
and setting TERM=xterm-256color gives more readable colors.

I find that black, red and blue gives readable text on white background,
magenta is worse but readable, green and cyan are marginal, and yellow
is unreadable.
--
Fredrik Stax\"ang | rot13: ***@hcqngr.hh.fr
This is all you need to know about vi: ESC : q ! RET
Joerg Mertens
2012-09-15 09:28:06 UTC
Permalink
Post by Fredrik Staxeng
Thank you for taking time to reply, but unfortunately emacs still uses
yellow foreground. I tried to find out how many colors emacs thinks my
xterm has, but (terminal-parameters) doesn't say, and (frame-parameters)
gets truncated.
Try M-x list-colors-display

Regards
Teemu Likonen
2012-09-15 07:51:08 UTC
Permalink
Post by Fredrik Staxeng
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I
tell Emacs that my backgroud is white?
There are certain variables for changing frame parameters, including
colors. I just copy my settings; you can probably pick the idea from
this. I use default colors but white background in X Window System
frames and dark background in text terminal frames (usually Xterm, 256
colors).


(setq initial-frame-alist nil
default-frame-alist nil
window-system-default-frame-alist
'((x (menu-bar-lines . 1)
(tool-bar-lines . 0)
(vertical-scroll-bars . right)
(left-fringe . 8)
(right-fringe . 8)
(foreground-color . "black")
(background-color . "white")
(background-mode . light)
(font . "Monospace-11"))
(nil (menu-bar-lines . 0)
(foreground-color . "white")
(background-color . "black")
(background-mode . dark))))
Fredrik Staxeng
2012-09-15 09:04:15 UTC
Permalink
Post by Teemu Likonen
Post by Fredrik Staxeng
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I
tell Emacs that my backgroud is white?
There are certain variables for changing frame parameters, including
colors. I just copy my settings; you can probably pick the idea from
this. I use default colors but white background in X Window System
frames and dark background in text terminal frames (usually Xterm, 256
colors).
I found out that font-lock-variable-face uses yellow foreground
regardless of background when emacs thinks the terminal has 8 colors.
--
Fredrik Stax\"ang | rot13: ***@hcqngr.hh.fr
This is all you need to know about vi: ESC : q ! RET
Dan Espen
2012-09-15 13:14:08 UTC
Permalink
Post by Fredrik Staxeng
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I tell
Emacs that my backgroud is white?
If you are using xterm, the colors are adjustable.
In my X resources I have:

XTerm*color3: Yellow

For a white background, I'd recommend something like:

XTerm*color3: Brown

Check the xterm man page for full details.
--
Dan Espen
Fredrik Staxeng
2012-09-15 14:04:24 UTC
Permalink
Post by Dan Espen
Post by Fredrik Staxeng
I like my xterms to have black text on white background, but Emacs
uses yellow as foreground colour, which is almost unreadble. Can I tell
Emacs that my backgroud is white?
If you are using xterm, the colors are adjustable.
XTerm*color3: Yellow
XTerm*color3: Brown
Check the xterm man page for full details.
Thanks, that might be a better solution than using TERM=xterm-256color.
--
Fredrik Stax\"ang | rot13: ***@hcqngr.hh.fr
This is all you need to know about vi: ESC : q ! RET
Loading...