#!/bin/zsh set +H blue=$'\033[38;2;0;114;206m' white=$'\033[38;2;245;245;245m' reset=$'\033[0m' print_line() { local r="$1" local line="$2" local out="" local c ch center band center=$((6 + r*12)) band=6 for ((c=1; c<=${#line}; c++)); do ch="${line[c]}" if [[ "$ch" == " " ]]; then out+=" " elif (( c-1 >= center-band && c-1 <= center+band )); then out+="${blue}${ch}${reset}" else out+="${white}${ch}${reset}" fi done print -r -- "$out" } print_line 0 " █ ███ " print_line 1 " █ █ █ ██ ██ " print_line 2 " ███ ███ ███ █/█ ██ █ █ █_ █__█ █/█" print_line 3 "█ █ █ ███ █ █ █ █ █ █ █ █ █ █ █" print_line 4 " ███ ███ ███ █ ██ █ █ ██ ██ █"