]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/colordump
.vim: Update bundle submodules
[dotfiles.git] / bin / colordump
1 #!/bin/sh
2 # Usage: colordump
3 # Dump 256 ansi colors to the terminal.
4
5 printf "How each ANSI color is displayed on your terminal:\n\n"
6
7 i=0
8 row=0
9 while [ $i -lt 255 ];
10 do
11 newrow=$(expr $i / 10)
12 test $newrow -ne $row && printf "\n"
13 row=$newrow
14 printf "\e[%dm %03d \e[0m" $i $i
15 i=$(expr $i + 1)
16 done
17
18 printf '\n\n e.g., "\\e[41mTEXT\\e[0m" '
19 printf "\e[41m(for TEXT like this)\e[0m\n"