Changeset 225
- Timestamp:
- Nov 27, 2003, 2:27:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/NOTES
r223 r225 5 5 worked properly and which ones did not. 6 6 7 o In an XTerm terminal, the following shell commands output all possible 8 foreground/background combinations: 7 o I tested the following terminals: 9 8 10 for fgpre in "" '\e[0;1m'; do for fg in 0 4 2 6 1 5 3 7; do 9 name $TERM $COLORTERM 10 ------------------------------------------ 11 Linux console linux 12 pterm xterm 13 aterm xterm rxvt-xpm 14 wterm xterm wterm-xpm 15 Eterm xterm Eterm 16 xterm xterm 17 gnome-terminal xterm 18 konsole xterm 19 mlterm mlterm 20 uxterm xterm 21 22 o In most terminals, \e[3xm and \[4xm respectively set the foreground 23 and background colours. x is an colour between 0 and 7 or the value 24 9 for default value. 25 26 \e[0m sets everything to normal, \e[1m sets bold, \e[5m sets blink 27 and \e[7m sets inverse video. 28 29 In ncurses, only 64 colour pairs are created, and A_BOLD (\e[1m) and 30 A_BLINK (\e[5m) are used for foreground/background colour highlighting, 31 hence creating 256 possible colour pairs. 32 33 Different tests of blue on yellow: 34 35 for invert in '' '\e[7m'; do 36 for blink in '' '\e[5m'; do 37 for bold in '' '\e[1m'; do 38 echo -ne "$bold$blink$invert"'\e[34m\e[43m'hop'\e[0m ' 39 echo "($bold$blink$invert)" 40 done 41 done 42 done 43 44 Successfully works on: 45 + Linux console 46 + pterm 47 + Eterm 48 + aterm, wterm, rxvt 49 50 Almost works on: 51 + xterm (bright bg works for blue, but not for red or yellow) 52 53 Fails on: 54 + mlterm (no bright colours, neither fg nor bg) 55 + gnome-terminal (no bright bg) 56 + konsole (no bright bg, $blink really blinks) 57 58 o In an XTerm-compatible terminal, \e[9xm sets bright foreground and 59 \e[10xm bright background colours. Unfortunately all terminals don't 60 support these escape sequences. Here is a testcase: 61 62 for fgpre in 3 9; do for fg in 0 4 2 6 1 5 3 7; do 11 63 for bgpre in 4 10; do 12 echo -ne "$fgpre"'\e[3'$fg'm'64 echo -ne '\e['$fgpre$fg'm' 13 65 for bg in 0 4 2 6 1 5 3 7; do echo -ne '\e['$bgpre$bg'm# '; done 14 echo -ne '\e[0 ;0m '66 echo -ne '\e[0m ' 15 67 done 16 68 echo '' 17 69 done; echo ''; done 18 70 19 Successfully tested 71 Successfully tested on: 72 + gnome-terminal 73 + konsole 74 + xterm 75 + pterm 20 76 21 o ncurses: 22 23 * bright combinations work in the following terminals: 24 25 - Linux console (TERM=linux) 26 - pterm (TERM=xterm) 27 28 * bright text on bright background is rendered as bright text on 29 normal background in the following terminals: 30 31 - xterm (TERM=xterm) 32 - gnome-terminal (TERM=xterm) 77 Failed (\e[9x and \e[10x don't work) on: 78 + Eterm 79 + aterm, wterm, rxvt 80 + mlterm 81 + linux 33 82 34 83 o S-Lang: 35 84 36 85 o MS-DOS: all bright colours, bright backgrounds, and bright combinations 37 work using <conio.h>. 86 work using <conio.h>. No need to kludge anything. 38 87
Note: See TracChangeset
for help on using the changeset viewer.