|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi everybody
I have a problem with yellow color in terminal (KDE Konsole). I obtain yellow as font color, but never as background color. The first command gives "foobar" in yellow on black background: $ echo -e "\033[1m\033[33m\033[40m foobar \033[0m" The second command tries to obtain the video inversion of the former, i.e. black on yellow. But in place of yellow, I obtain orange in background: $ echo -e "\033[7m\033[1m\033[33m\033[40m foobar \033[0m" I do not manage to obtain yellow in background. But it must be possible: when you select yellow words in VIM editor (try with or without SHIFT pressed during selection with mouse), VIM makes video inversion, with real yellow in background. What is the trick to obtain yellow? Thanks in advance, Julien -- "Allez, Monsieur, allez, et la foi vous viendra." (D'Alembert). |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
2006-11-05, 16:04(+01), Tribulations Parallèles:
> Hi everybody > > I have a problem with yellow color in terminal (KDE Konsole). I obtain > yellow as font color, but never as background color. > > The first command gives "foobar" in yellow on black background: > > $ echo -e "\033[1m\033[33m\033[40m foobar \033[0m" > > The second command tries to obtain the video inversion of the former, i.e. > black on yellow. But in place of yellow, I obtain orange in background: > > $ echo -e "\033[7m\033[1m\033[33m\033[40m foobar \033[0m" > > I do not manage to obtain yellow in background. But it must be possible: > when you select yellow words in VIM editor (try with or without SHIFT > pressed during selection with mouse), VIM makes video inversion, with real > yellow in background. > > What is the trick to obtain yellow? [...] You need color 11 for bright yellow. This is possible as konsole seems to support 16 colors, even though on my system it claims a TERM=xterm and the corresponding terminfo entry only advertises 8 colors. TERM=xterm-16color tput setab 11 Or: printf '\033[103mfoo\033[m\n' Or: printf '\033[93;7mfoo\033[m\n' See xterm for a terminal with support of 256 colors with a real palette (pterm might do as well as putty does support 256 colors). -- Stéphane |
|
![]() |
| Outils de la discussion | |
|
|