#!/bin/bash

# Arrays for text styles, colors, and backgrounds
STYLES=("0" "1" "3" "4" "7") # Reset, Bold, Italic, Underline, Reversed
TEXT_COLORS=("30" "31" "32" "33" "34" "35" "36" "37") # Black to White
BG_COLORS=("40" "41" "42" "43" "44" "45" "46" "47") # Background colors

# Select random values from arrays
RANDOM_STYLE=${STYLES[$RANDOM % ${#STYLES[@]}]}
RANDOM_TEXT_COLOR=${TEXT_COLORS[$RANDOM % ${#TEXT_COLORS[@]}]}
RANDOM_BG_COLOR=${BG_COLORS[$RANDOM % ${#BG_COLORS[@]}]}

# Display the random style
echo "Your random \\e style: \\e[${RANDOM_STYLE};${RANDOM_TEXT_COLOR};${RANDOM_BG_COLOR}m"
echo -e "\\e[${RANDOM_STYLE};${RANDOM_TEXT_COLOR};${RANDOM_BG_COLOR}mThis is a test text with the generated style!\\e[0m"
