[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
colors #8-16 are not bright
From: |
Alain Bench |
Subject: |
colors #8-16 are not bright |
Date: |
Sat, 25 Mar 2006 14:13:15 +0100 (CET) |
User-agent: |
Mutt/1.4i-ja.1 |
Hello,
I have a problem to display colors #8 to #15 in Screen 4.0.2 on a
PuTTY 0.58 terminal. What gets displayed is color number minus 8: The
dark colors #0 to #7.
Example: In PuTTY I export TERM=putty-256color, and have added such
a customized entry to my system terminfo database from
Ncurses-5.5-20060128 (latest rollup patch). It notably contains:
| putty-256color|PuTTY terminal emulator (v0.58 with 256 colors),
| colors#256, pairs#32767,
| setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
| setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
| use=putty,
In straight PuTTY I get the expected bright blue ink^W foreground
when doing any of:
| $ tput setaf 12 ; echo brightblue # this sends ESC[94m
| $ printf "\033[94m brightblue" # color #12 in 16 colors scheme
| $ printf "\033[38;5;12m brightblue" # color #12 in 256 colors scheme
But in Screen, for both 16 and 256 colors schemes, I get dark blue,
color #4. To analyse what happens I first start "script", then Screen,
and finaly look at the generated typescript file. I can see that Screen
translated my escape sequences: When I type in Screen printf "\033[94m"
or printf "\033[38;5;12m", Screen sends to PuTTY ESC[34m (color #4).
The same happens with an underlying TERM=putty-16color entry, and
with many entries declaring 16 or more colors. The same happens with or
without ./configure --enable-colors256 option. And the same happens with
any TERM exported inside Screen.
OTOS the problem disappears if the underlying TERM name begins by
"xterm" or "rxvt", even if it's a faked alias to my own "putty-*color"
entry. Colors #8 to #15 are then bright. Exactly Screen then sends to
PuTTY ESC[34mESC[94m (color #4 then #12), which wastes some bytes, but
has the desired bright effect.
Is that dark #8-15 colors a bug? And is there a solution or
workaround sufficiently generic to work with any terminals having 16 or
more colors? Please note that I'm not familiar with Screen: I built it
just to check this problem that was reported to me. My ~/.screenrc is
nearly empty: defbce on and startup_message off only.
Bye! Alain.
--
Give your computer's unused idle processor cycles to a scientific goal:
The address@hidden project at <URL:http://folding.stanford.edu/>.
- colors #8-16 are not bright,
Alain Bench <=