Skip to content

Instantly share code, notes, and snippets.

@rcmdnk

rcmdnk/colcheck.sh

Created Sep 5, 2013
Embed
What would you like to do?
#!/bin/bash
bg=40
if [ "$1" != "" ];then
if [ "$1" = "white" ] || [ "$1" = "w" ];then
bg=47
fi
fi
for i in {0..255}; do
num=`printf "%03d" $i`
printf " \e[${bg};38;05;${i}m${num}\e[m"
if [ $((${i}%16)) -eq 15 ];then
echo
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment