Skip to content

Instantly share code, notes, and snippets.

@kevinquinnyo
Created September 25, 2016 20:40
Show Gist options
  • Save kevinquinnyo/1598610d133e4f9f872de1444677a5cf to your computer and use it in GitHub Desktop.
Save kevinquinnyo/1598610d133e4f9f872de1444677a5cf to your computer and use it in GitHub Desktop.
Test terminal for 256 color support
# Stolen from http://www.commandlinefu.com/commands/view/6533/print-all-256-colors-for-testing-term-or-for-a-quick-reference
( x=`tput op` y=`printf %$((${COLUMNS}-6))s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done; )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment