I'm using emacs in a console window both on my local Linux box and on the login node of a remote cluster. I use emacs regularly, and I've got the foreground color set to white in my .emacs file like so:
(set-foreground-color "white")
(set-background-color "black")
However, when I run emacs, the foreground isn't white; it's grey and very hard to read. On my Mac, emacs in a console window with the same settings shows up as proper white. But on both linux boxes, in konsole and xterm, it's grey.
In case it matters, I've got TERM
set to xterm-color, the desktop is running RHEL 5, and the cluster node is running RHEL 4 (CentOS).
Is this some default with how Linux sets up terminal colors? How do I get white to be white?
Note: this is with console emacs, not emacs under X. That's emacs -nw
if you have DISPLAY
set.
To change the foreground or background color in Emacs through the windowing interface, you can use the menu commands Foreground Color->Other and Background Color->Other in the Edit->Text Properties menu.
The color brightwhite
looks ok on my Emacs (which is running under a terminal, not X). On RHEL5 I have my TERM
environment variable set to xterm-256color
. If it's working correctly, you should be able to run these scripts and see 256-color output. Under Emacs, you should see a reasonably smooth color ramp (no obviously duplicated colors) when you do M-x list-colors-display
. If not, you are probably missing the right termcap entry (try installing the libtermcap-devel
package, I think).
If I change TERM
to xterm-color
, then brightwhite
comes out a bit gray in the output of list-colors-display
.
I'm not sure about RHEL4.
What about:
(set-foreground-color "brightwhite")
In response to comment:
Within emacs, run M-x list-colors-display
which should show you all of the colors that emacs thinks are available with your terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With