[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to fix too-dark blue keywords with black background
From: |
Emanuel Berg |
Subject: |
Re: how to fix too-dark blue keywords with black background |
Date: |
Fri, 03 Jun 2016 23:44:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
barrchris@gmail.com writes:
> Certain keywords display with an unreadable
> dark blue, on a black background. Like:
> getopts or echo or source, with emacs mode
> Shell-script[bash]. Other things are too dark
> in sql-mode: SQL[ansi]
>
> Is it best to change the dark blue in PuTTY
> settings or in emacs?
Both!
Start by setting up the terminal colors.
It is a good help to have a test function to
output all colors.
For example the below zsh. Here is a dump what
it shows for me:
http://user.it.uu.se/~embe8573/figures/shell/test-colors.png
Then get the colors right. I don't know how to
do that for PuTTY - for the Linux VTs and
X (e.g., xterm) tho there are some material
here:
http://user.it.uu.se/~embe8573/cols/www/index.html
http://user.it.uu.se/~embe8573/cols/www/COLORS
http://user.it.uu.se/~embe8573/scripts/cols
After you have done this, nine out of ten
colors in Emacs should look good. If you see
one that doesn't, place point at it and use
this function to find out what face it is:
(defun what-face (pos)
(interactive "d")
(let((face (or (get-char-property pos 'face)
(get-char-property pos 'read-cf-name) )))
(message " Face: %s" (or face "(no face!)")) ))
Then re-assign the face some other color which
is better in that context.
Oh, the zsh - change into bash if needed:
set-fg-color () { tput setaf $1 } # color ($1) is 0-7
set-bg-color () { tput setab $1 }
set-bold () { tput bold }
reset-color () { tput sgr0 }
test-colors () {
local color_number
local color
local -a color_names
color_names=(black red green yellow blue magenta cyan white)
echo
for color_number in {0..7}; do
echo -n " $color_number "
set-fg-color $color_number
color=$color_names[(( $color_number + 1 ))]
echo -n $color "\t"; tput bold; echo $color
reset-color
done
echo
}
>From the file: http://user.it.uu.se/~embe8573/conf/.zsh/vt
Good luck!
--
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
- so far: 45 Blogomatic articles -