User Tools

Site Tools


system:console:256colors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
system:console:256colors [2015/07/04 02:11] – external edit 127.0.0.1system:console:256colors [2023/03/21 16:56] (current) phil
Line 1: Line 1:
 ====== 256 Colors ====== ====== 256 Colors ======
  
-Once upon a time, having a coloured terminal displaying whole eight different +Once upon a time, having a colored terminal displaying whole eight different 
-colours was subject to the geeks amongst all the terminal users. Nowadays, +colors was subject to the geeks amongst all the terminal users. Nowadays, 
-this is nothing special anymore.  Consequently, one has to go further: 256+this is nothing special anymore. Consequently, one has to go further: 256
 colours! colours!
- 
-This is how we go. 
  
 ===== rxvt-unicode ===== ===== rxvt-unicode =====
Line 42: Line 40:
  
 This depends on the value of ''$TERM'' at the time ''screen'' is started - This depends on the value of ''$TERM'' at the time ''screen'' is started -
-''rxvt-256color'' is fine.+''rxvt-256color'' is fine. Or maybe not? In doubt, one may override it: 
 + 
 +<file txt .screenrc> 
 +term xterm-256color 
 +</file>
  
 ===== Mutt ===== ===== Mutt =====
Line 77: Line 79:
  
 exit 0 exit 0
 +</file>
 +
 +This one is also nice, found on
 +[[https://gist.github.com/eliranmal/b373abbe1c21e991b394bdffb0c8a6cf|Github]] and
 +customized to get default parameter from tput output:
 +
 +<file bash show-ansi-colors.sh>
 +#!/bin/bash
 +
 +ncolors=${1:-$(tput colors)}
 +
 +echo "showing $ncolors ansi colors:"
 +for ((n = 0; n < $ncolors; n++)); do
 +        printf " [$n] $(tput setaf $n)"
 +        printf "wMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMw"
 +        printf "$(tput sgr0)\n"
 +done
 </file> </file>
  
system/console/256colors.1435975886.txt.gz · Last modified: 2015/07/04 02:11 by 127.0.0.1