#!/bin/bash # # "colsel" - a term color selector # Restore original term settings on exit trap 'reset' 0 # Cycle the background color set for n in `seq 40 47` do # Cycle the foreground color set for m in `seq 30 37` do echo -en "\E[$m;${n}m" # Redraw screen with new color set clear echo -n "The selected colors are " # Set the colors to black and white for readability echo -en "\E[37;40m" # Show the settings echo $n $m sleep 1 done done