BASH - Colour menu
A colour changing banner in the center of the screen
DATA[0]=" ##### #### ##### #### # #" DATA[1]=" # #### # # # # # # #" DATA[2]=" ### # # # ##### # ######" DATA[3]=" # # # # # # # # #" DATA[4]=" ##### #### #### # # #### # #" # virtual coordinate system is X*Y ${#DATA} * 5 REAL_OFFSET_X=30 REAL_OFFSET_Y=10 draw_char() { V_COORD_X=$1 V_COORD_Y=$2 tput cup $((REAL_OFFSET_Y + V_COORD_Y)) $((REAL_OFFSET_X + V_COORD_X)) printf %c ${DATA[V_COORD_Y]:V_COORD_X:1} } trap 'exit 1' INT TERM trap 'tput setaf 9; tput cvvis; clear' EXIT tput civis clear while :; do for ((int_Colour=1; int_Colour <= 7; int_Colour++)); do tput setaf $int_Colour for ((x=0; x<${#DATA[0]}; x++)); do for ((y=0; y<=4; y++)); do draw_char $x $y done done done done