sunhat/bin/ascii.sh

30 lines
862 B
Bash
Raw Normal View History

2024-06-09 16:29:49 -05:00
ascii_art=$(cat << 'EOF'
2024-06-09 04:16:43 -05:00
__ _ _ _.--._
/ _\_ _ _ __ | |__ __ _| |_ _.-.' `.-._
\ \| | | | '_ \| '_ \ / _` | __| .' ./`--...--' \ `.
_\ \ |_| | | | | | | | (_| | |_ `.'.`--.._..--' .'
\__/\__,_|_| |_|_| |_|\__,_|\__| `-..__ __..-'
````
2024-06-09 16:29:49 -05:00
EOF
)
2024-05-31 13:29:00 -05:00
# Define the color gradient (shades of cyan and blue)
colors=(
'\033[38;5;81m' # Cyan
'\033[38;5;75m' # Light Blue
'\033[38;5;69m' # Sky Blue
'\033[38;5;63m' # Dodger Blue
'\033[38;5;57m' # Deep Sky Blue
'\033[38;5;51m' # Cornflower Blue
'\033[38;5;45m' # Royal Blue
)
# Split the ASCII art into lines
IFS=$'\n' read -rd '' -a lines <<<"$ascii_art"
# Print each line with the corresponding color
for i in "${!lines[@]}"; do
color_index=$((i % ${#colors[@]}))
echo -e "${colors[color_index]}${lines[i]}"
done