#!/bin/bash
# (C) David Vajda
# 2025-08-03
# Bash Color Tester
rm colors.tmp20250803.cmp.txt
rm colors.tmp20250803.txt
ColorsAcrynomEn=("Red: rd" "Orange: or" "Yellow: ye" "Green: gn" "Blue: bl" "Purple: pu" "Brown: br" "Black: bk" "White: wh" "Grey/Gray: gy" "Gold: go" "Silver: si")
forground1=30
forground2=90
for s in "${ColorsAcrynomEn[@]}"
do
echo "$s"
done
echo "colors=(" >> colors.tmp20250803.txt
i=$forground1
while [ $i -lt $(($forground1+20)) ]
do
echo -e "\e[${i}m \e[$((($i+2)))m please insert color \e[0m"
read -p "erster buchstabe: " color1
read -p "zweiter buchstabe: " color2
if [[ "$color1" != "n" && "$color2" != "o" ]]
then
echo "\"\e[${i}m \e[$((($i+2)))m $color1 \e[0m\" \"\e[${i}m \e[$((($i+2)))m $color2 \e[0m\"" >> colors.tmp20250803.txt
echo "$i $color1$color2" >> colors.tmp20250803.cmp.txt
fi
i=$(($i+1))
done
i=$forground2
while [ $i -lt $(($forground2+20)) ]
do
echo -e "\e[${i}m \e[$((($i+2)))m please insert color \e[0m"
read -p "erster buchstabe: " color1
read -p "zweiter buchstabe: " color2
if [[ "$color1" != "n" && "$color2" != "no" ]]
then
echo "\"\e[${i}m \e[$((($i+2)))m $color1 \e[0m\" \"\e[${i}m \e[$((($i+2)))m $color2 \e[0m\"" >> colors.tmp20250803.txt
echo "$i $color1$color2" >> colors.tmp20250803.cmp.txt
fi
i=$(($i+1))
done
echo ")" >> colors.tmp20250803.txt