I have run into a couple of shell scripts that print terminal colours as blocks of colour or text but none have been formatted in a way that showed a terminal colour scheme that well. Recently I have taken up adopting the solarized colour scheme but I’ve been trying to modify it slightly to suit my tastes and have had trouble discerning what colours were what, as some colours are replaced with different shades of grey.
Reading the debian planet I came across Antonio Terceiro’s post on a neat simple shell script to print out all the ANSI colour codes and I really like the formatting, so I want to save it here so I don’t forget.
#!/bin/sh -e for attr in $(seq 0 1); do for fg in $(seq 30 37); do for bg in $(seq 40 47); do echo -n "\033[$attr;${bg};${fg}m$attr;$fg;$bg\033[m " done echo done done