Add ANSI/ansi_colors.sh
This commit is contained in:
parent
b850a6638f
commit
fe8eddf726
16
ANSI/ansi_colors.sh
Normal file
16
ANSI/ansi_colors.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Print ANSI color codes
|
||||
|
||||
count=0
|
||||
for i in {0..255}; do
|
||||
# Print the color-coded number, padded to 3 digits
|
||||
printf "\033[38;5;${i}m%3d\033[0m " $i
|
||||
|
||||
# After printing 16 numbers, start a new line
|
||||
((count++))
|
||||
if ((count == 16)); then
|
||||
echo
|
||||
count=0
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user