-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathascii.sh
More file actions
34 lines (29 loc) · 1 KB
/
ascii.sh
File metadata and controls
34 lines (29 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
ascii_art=$(cat <<'EOF'
______ __ __ __ __
____ _ ____
/ ___|___ __| | ___ / ___|___ _ __ ___ _ __ __ _ ___ ___
| | / _ \ / _` |/ _ \ | / _ \| _ _ _| _ \ / _` / __/ __|
| |__| (_) | (_| | __/ |__| (_) | | | | | |_) | (_| \__ \__ \
\____\___/ \__,_|\___|\____\___/|_| |_| |_| .__/ \__,_|___/___/
|_|
C O D E C O M P A S S
EOF
)
# 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