Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

88 rindas
2.7 KiB

  1. $Id$
  2. o Colour does not work with all backends and all terminals. I tested
  3. many terminal emulators and tried to summarise which combinations
  4. worked properly and which ones did not.
  5. o I tested the following terminals:
  6. name $TERM $COLORTERM
  7. ------------------------------------------
  8. Linux console linux
  9. pterm xterm
  10. aterm xterm rxvt-xpm
  11. wterm xterm wterm-xpm
  12. Eterm xterm Eterm
  13. xterm xterm
  14. gnome-terminal xterm
  15. konsole xterm
  16. mlterm mlterm
  17. uxterm xterm
  18. o In most terminals, \e[3xm and \[4xm respectively set the foreground
  19. and background colours. x is an colour between 0 and 7 or the value
  20. 9 for default value.
  21. \e[0m sets everything to normal, \e[1m sets bold, \e[5m sets blink
  22. and \e[7m sets inverse video.
  23. In ncurses, only 64 colour pairs are created, and A_BOLD (\e[1m) and
  24. A_BLINK (\e[5m) are used for foreground/background colour highlighting,
  25. hence creating 256 possible colour pairs.
  26. Different tests of blue on yellow:
  27. for invert in '' '\e[7m'; do
  28. for blink in '' '\e[5m'; do
  29. for bold in '' '\e[1m'; do
  30. echo -ne "$bold$blink$invert"'\e[34m\e[43m'hop'\e[0m '
  31. echo "($bold$blink$invert)"
  32. done
  33. done
  34. done
  35. Successfully works on:
  36. + Linux console
  37. + pterm
  38. + Eterm
  39. + aterm, wterm, rxvt
  40. Almost works on:
  41. + xterm (bright bg works for blue, but not for red or yellow)
  42. Fails on:
  43. + mlterm (no bright colours, neither fg nor bg)
  44. + gnome-terminal (no bright bg)
  45. + konsole (no bright bg, $blink really blinks)
  46. o In an XTerm-compatible terminal, \e[9xm sets bright foreground and
  47. \e[10xm bright background colours. Unfortunately all terminals don't
  48. support these escape sequences. Here is a testcase:
  49. for fgpre in 3 9; do for fg in 0 4 2 6 1 5 3 7; do
  50. for bgpre in 4 10; do
  51. echo -ne '\e['$fgpre$fg'm'
  52. for bg in 0 4 2 6 1 5 3 7; do echo -ne '\e['$bgpre$bg'm# '; done
  53. echo -ne '\e[0m '
  54. done
  55. echo ''
  56. done; echo ''; done
  57. Successfully tested on:
  58. + gnome-terminal
  59. + konsole
  60. + xterm
  61. + pterm
  62. Failed (\e[9x and \e[10x don't work) on:
  63. + Eterm
  64. + aterm, wterm, rxvt
  65. + mlterm
  66. + linux
  67. o S-Lang:
  68. o MS-DOS: all bright colours, bright backgrounds, and bright combinations
  69. work using <conio.h>. No need to kludge anything.