From cca0356ac261a9216e0f56acacab053136e7a5e7 Mon Sep 17 00:00:00 2001 From: Eichehome Date: Sat, 15 Mar 2025 01:26:58 +0100 Subject: [PATCH] Reworked Color Script with suported ANSI Codes --- colors.sh | 153 +++++++++++++++++++++++++++++------------------------- 1 file changed, 81 insertions(+), 72 deletions(-) diff --git a/colors.sh b/colors.sh index d28cb38..35dfee6 100644 --- a/colors.sh +++ b/colors.sh @@ -1,77 +1,86 @@ #!/bin/bash -echo -e "\e[32;1mSet\e[0m" -echo -ne "\e[1m 1: Bold \e[0m" -echo -ne "\e[2m 2: Dim \e[0m" -echo -ne "\e[3m 3: Italic \e[0m" -echo -ne "\e[4m 4: Underlined \e[0m" -echo -echo -ne "\e[5m 5: Blink \e[0m" -echo -ne "\e[6m 6: Overline \e[0m" -echo -ne "\e[7m 7: Invert \e[0m" -echo -ne " 8: Hidden " -echo -echo -ne "\e[9m 9: Strikeout \e[0m" -echo -echo +echo "" +echo -e "\e[34;1mFormat\e[0m" +echo "" +echo -e "\e[32;1m Set\e[0m" +echo "" -echo -e "\e[32;1mReset\e[0m" -echo -ne "\e[0m 0: Reset all \e[0m" -echo -ne "\e[21m 21: Bold/bright \e[0m" -echo -ne "\e[22m 22: Dim \e[0m" -echo -ne "\e[24m 24: Underlined \e[0m" -echo -echo -ne "\e[25m 25: Blink \e[0m" -echo -ne "\e[27m 27: Reverse \e[0m" -echo -ne "\e[28m 28: Hidden \e[0m" -echo -echo +echo -ne "\e[1m 1: Bold \e[0m" +echo -ne "\e[2m 2: Dim \e[0m" +echo -ne "\e[3m 3: Italic \e[0m" +echo -e "\e[4m 4: Underline \e[0m" +echo -ne "\e[5m 5: Blinking \e[0m" +echo -ne "\e[7m 7: Invert \e[0m" +echo -en " 8: Hide " +echo -e "\e[9m 9: Strikeout \e[0m" -echo -e "\e[32;1mForeground (text);" -echo -ne "\e[39m 39: Default \e[0m" -echo -ne "\e[30;107m 30: Black \e[0m" -echo -ne "\e[31m 31: Red \e[0m" -echo -ne "\e[32m 32: Green \e[0m" -echo -echo -ne "\e[33m 33: Yellow \e[0m" -echo -ne "\e[34m 34: Blue \e[0m" -echo -ne "\e[35m 35: Magenta \e[0m" -echo -ne "\e[36m 36: Cyan \e[0m" -echo -echo -ne "\e[37m 37: Light Gray \e[0m" -echo -ne "\e[90m 90: Dark Gray \e[0m" -echo -ne "\e[91m 91: Light Red \e[0m" -echo -ne "\e[92m 92: Light Green \e[0m" -echo -echo -ne "\e[93m 93: Light Yellow \e[0m" -echo -ne "\e[94m 94: Light Blue \e[0m" -echo -ne "\e[95m 95: Light Magenta \e[0m" -echo -ne "\e[96m 96: Light Cyan \e[0m" -echo -echo -ne "\e[97m 97: White \e[0m" -echo -echo +echo "" +echo -e "\e[31;1m Unset\e[0m" +echo "" -echo -e "\e[32;1mBackground\e[0m" -echo -ne "\e[49m 49: Default \e[0m" -echo -ne "\e[40m 40: Black \e[0m" -echo -ne "\e[41m 41: Red \e[0m" -echo -ne "\e[42m 42: Green \e[0m" -echo -echo -ne "\e[43m 43: Yellow \e[0m" -echo -ne "\e[44m 44: Blue \e[0m" -echo -ne "\e[45m 45: Magenta \e[0m" -echo -ne "\e[46m 46: Cyan \e[0m" -echo -echo -ne "\e[30;47m 47: Light Gray \e[0m" -echo -ne "\e[30;100m 100: Dark Gray \e[0m" -echo -ne "\e[30;101m 101: Light Red \e[0m" -echo -ne "\e[30;102m 102: Light Green \e[0m" -echo -echo -ne "\e[30;103m 103: Light Yellow \e[0m" -echo -ne "\e[30;104m 104: Light Blue \e[0m" -echo -ne "\e[30;105m 105: Light Magenta \e[0m" -echo -ne "\e[30;106m 106: Light Cyan \e[0m" -echo -echo -ne "\e[30;107m 107: White \e[0m" -echo +echo -ne "\e[1m 0: Reset\e[0m allg. " +echo -ne "\e[2m 22: Normal\e[22m Intensity " +echo -ne "\e[3m 23: not\e[23m Italic " +echo -e "\e[4m 24: not\e[24m Underline " +echo -ne "\e[5m 25: not\e[25m Blinking " +echo -ne " 28: Reveal " +echo -ne "\e[9m 29: not\e[29m Crossed out " +echo "" + +echo "" +echo -e "\e[34;1mColors (4-Bit)\e[0m" +echo "" + +echo -e "\e[32;1m Foreground\e[0m" +echo "" + +echo -ne "\e[30;47m 30: Black \e[0m" +echo -ne "\e[31m 31: Red \e[0m" +echo -ne "\e[32m 32: Green \e[0m" +echo -e "\e[33m 33: Yellow \e[0m" +echo -ne "\e[34m 34: Blue \e[0m" +echo -ne "\e[35m 35: Magenta \e[0m" +echo -ne "\e[36m 36: Cyan \e[0m" +echo -e "\e[37m 37: White \e[0m" +echo -ne "\e[90m 90: Bright Black (Gray) \e[0m" +echo -ne "\e[91m 91: Bright Red \e[0m" +echo -ne "\e[92m 92: Bright Green \e[0m" +echo -e "\e[93m 93: Bright Yellow \e[0m" +echo -ne "\e[94m 94: Bright Blue \e[0m" +echo -ne "\e[95m 95: Bright Magenta \e[0m" +echo -ne "\e[96m 96: Bright Cyan \e[0m" +echo -e "\e[97m 97: Bright White \e[0m" +echo "" + +echo -e "\e[32;1m Background\e[0m" +echo "" + +echo -ne "\e[40m 40: Black \e[0m" +echo -ne "\e[41m 41: Red \e[0m" +echo -ne "\e[42m 42: Green \e[0m" +echo -e "\e[43m 43: Yellow \e[0m" +echo -ne "\e[44m 44: Blue \e[0m" +echo -ne "\e[45m 45: Magenta \e[0m" +echo -ne "\e[46m 46: Cyan \e[0m" +echo -e "\e[30;47m 47: White \e[0m" +echo -ne "\e[100m 100: Bright Black (Gray) \e[0m" +echo -ne "\e[101m 101: Bright Red \e[0m" +echo -ne "\e[102m 102: Bright Green \e[0m" +echo -e "\e[103m 103: Bright Yellow \e[0m" +echo -ne "\e[104m 104: Bright Blue \e[0m" +echo -ne "\e[105m 105: Bright Magenta \e[0m" +echo -ne "\e[106m 106: Bright Cyan \e[0m" +echo -e "\e[107m 107: Bright White \e[0m" + +echo "" +echo -e "\e[34;1mColors (8-Bit)\e[0m" +echo "" +echo '\e[38;5;m' +echo "" + +echo "" +echo -e "\e[34;1mColor (24-Bit)\e[0m" +echo "" +echo '\e[38;2;;;m' +echo "" \ No newline at end of file