#!/bin/bash

# The purpose of this script is a table of colors available with vt100 terminal escape patterns
# Created and donated by DarkX

echo 'Created and Donated by DarkX';
echo '';

#Colors for use in table
#Normal
N="\e[0m"

#Black
BLK="\e[30m"

#Red
RED="\e[31m"

#Green
GRN="\e[32m"

#Yellow
YLW="\e[33m"

#Blue
BLU="\e[34m"

#Magenta
MGN="\e[35m"

#Cyan
CYN="\e[36m"

#White
WHT="\e[37m"

#Bold Black
BBL="\e[30;1m"

#Bold Red
BRD="\e[31;1m"

#Bold Green
BGR="\e[32;1m"

#Bold Yellow
BYW="\e[33;1m"

#Bold Blue
BBU="\e[34;1m"

#Bold Magenta
BMG="\e[35;1m"

#Bold Cyan
BCY="\e[36;1m"

#Bold White
BWH="\e[37;1m"

#Black on Black Red Green Yellow Blue Magenta Cyan White
BLBL="\e[30;40m"
BLRD="\e[30;41m"
BLGR="\e[30;42m"
BLYW="\e[30;43m"
BLBU="\e[30;44m"
BLMG="\e[30;45m"
BLCY="\e[30;46m"
BLWH="\e[30;47m"

#Red on Black Red Green Yellow Blue Magenta Cyan White
RDBL="\e[31;40m"
RDRD="\e[31;41m"
RDGR="\e[31;42m"
RDYW="\e[31;43m"
RDBU="\e[31;44m"
RDMG="\e[31;45m"
RDCY="\e[31;46m"
RDWH="\e[31;47m"

#Green on Black Red Green Yellow Blue Magenta Cyan White
GRBL="\e[32;40m"
GRRD="\e[32;41m"
GRGR="\e[32;42m"
GRYW="\e[32;43m"
GRBU="\e[32;44m"
GRMG="\e[32;45m"
GRCY="\e[32;46m"
GRWH="\e[32;47m"

#Yellow on Black Red Green Yellow Blue Magenta Cyan White
YWBL="\e[33;40m"
YWRD="\e[33;41m"
YWGR="\e[33;42m"
YWYW="\e[33;43m"
YWBU="\e[33;44m"
YWMG="\e[33;45m"
YWCY="\e[33;46m"
YWWH="\e[33;47m"

#Blue on Black Red Green Yellow Blue Magenta Cyan White
BUBL="\e[34;40m"
BURD="\e[34;41m"
BUGR="\e[34;42m"
BUYW="\e[34;43m"
BUBU="\e[34;44m"
BUMG="\e[34;45m"
BUCY="\e[34;46m"
BUWH="\e[34;47m"

#Magenta on Black Red Green Yellow Blue Magenta Cyan White
MGBL="\e[35;40m"
MGRD="\e[35;41m"
MGGR="\e[35;42m"
MGYW="\e[35;43m"
MGBU="\e[35;44m"
MGMG="\e[35;45m"
MGCY="\e[35;46m"
MGWH="\e[35;47m"

#Cyan on Black Red Green Yellow Blue Magenta Cyan White
CYBL="\e[36;40m"
CYRD="\e[36;41m"
CYGR="\e[36;42m"
CYYW="\e[36;43m"
CYBU="\e[36;44m"
CYMG="\e[36;45m"
CYCY="\e[36;46m"
CYWH="\e[36;47m"

#White on Black Red Green Yellow Blue Magenta Cyan White
WHBL="\e[37;40m"
WHRD="\e[37;41m"
WHGR="\e[37;42m"
WHYW="\e[37;43m"
WHBU="\e[37;44m"
WHMG="\e[37;45m"
WHCY="\e[37;46m"
WHWH="\e[37;47m"

#Bold Blue on colors
BBBL="\e[1;30;40m"
BBRD="\e[1;30;41m"
BBGR="\e[1;30;42m"
BBYW="\e[1;30;43m"
BBBU="\e[1;30;44m"
BBMG="\e[1;30;45m"
BBCY="\e[1;30;46m"
BBWH="\e[1;30;47m"

#Bold Red on colors
BRBL="\e[1;31;40m"
BRRD="\e[1;31;41m"
BRGR="\e[1;31;42m"
BRYW="\e[1;31;43m"
BRBU="\e[1;31;44m"
BRMG="\e[1;31;45m"
BRCY="\e[1;31;46m"
BRWH="\e[1;31;47m"

#Bold Green on colors
BGBL="\e[1;32;40m"
BGRD="\e[1;32;41m"
BGGR="\e[1;32;42m"
BGYW="\e[1;32;43m"
BGBU="\e[1;32;44m"
BGMG="\e[1;32;45m"
BGCY="\e[1;32;46m"
BGWH="\e[1;32;47m"

#Bold Yellow on colors
BYBL="\e[1;33;40m"
BYRD="\e[1;33;41m"
BYGR="\e[1;33;42m"
BYYW="\e[1;33;43m"
BYBU="\e[1;33;44m"
BYMG="\e[1;33;45m"
BYCY="\e[1;33;46m"
BYWH="\e[1;33;47m"

#Bold blue on colors
BEBL="\e[1;34;40m"
BERD="\e[1;34;41m"
BEGR="\e[1;34;42m"
BEYW="\e[1;34;43m"
BEBU="\e[1;34;44m"
BEMG="\e[1;34;45m"
BECY="\e[1;34;46m"
BEWH="\e[1;34;47m"

#Bold Magenta on colors
BMBL="\e[1;35;40m"
BMRD="\e[1;35;41m"
BMGR="\e[1;35;42m"
BMYW="\e[1;35;43m"
BMBU="\e[1;35;44m"
BMMG="\e[1;35;45m"
BMCY="\e[1;35;46m"
BMWH="\e[1;35;47m"

#Bold Cyan on colors
BCBL="\e[1;36;40m"
BCRD="\e[1;36;41m"
BCGR="\e[1;36;42m"
BCYW="\e[1;36;43m"
BCBU="\e[1;36;44m"
BCMG="\e[1;36;45m"
BCCY="\e[1;36;46m"
BCWH="\e[1;36;47m"

#Bold White on colors
BWBL="\e[1;37;40m"
BWRD="\e[1;37;41m"
BWGR="\e[1;37;42m"
BWYW="\e[1;37;43m"
BWBU="\e[1;37;44m"
BWMG="\e[1;37;45m"
BWCY="\e[1;37;46m"
BWWH="\e[1;37;47m"

#Echo General Format
echo    " \\e[ATTRIB;FG;BGmTXT"
#First Line Break
echo -e "  \e[4;37;40m                                                                                          ${N}"

#Prints out the table like this:
# fg          bg
# BG Headers
# Black color row
# Red color row
# Green Color Row
# Yellow color row
# Blue color row
# Magenta color row
# Cyan color row
# White color row
#
# Repeat above color rows but as bolds
echo -e "  \e[4;37;40mfg${N}                \e[4;37;40mbg${N}"
echo -e "         40  ${BLRD}41  ${BLGR}42  ${BLYW}43  ${BLBU}44  ${BLMG}45  ${BLCY}46  ${BLWH}47  ${N}"
echo -e "  30     ${BLBL}txt ${BLRD}txt ${BLGR}txt ${BLYW}txt ${BLBU}txt ${BLMG}txt ${BLCY}txt ${BLWH}txt ${N}"
echo -e "  ${RED}31     ${RDBL}txt ${RDRD}txt ${RDGR}txt ${RDYW}txt ${RDBU}txt ${RDMG}txt ${RDCY}txt ${RDWH}txt ${N}"
echo -e "  ${GRN}32     ${GRBL}txt ${GRRD}txt ${GRGR}txt ${GRYW}txt ${GRBU}txt ${GRMG}txt ${GRCY}txt ${GRWH}txt ${N}"
echo -e "  ${YLW}33     ${YWBL}txt ${YWRD}txt ${YWGR}txt ${YWYW}txt ${YWBU}txt ${YWMG}txt ${YWCY}txt ${YWWH}txt ${N}"
echo -e "  ${BLU}34     ${BUBL}txt ${BURD}txt ${BUGR}txt ${BUYW}txt ${BUBU}txt ${BUMG}txt ${BUCY}txt ${BUWH}txt ${N}"
echo -e "  ${MGN}35     ${MGBL}txt ${MGRD}txt ${MGGR}txt ${MGYW}txt ${MGBU}txt ${MGMG}txt ${MGCY}txt ${MGWH}txt ${N}"
echo -e "  ${CYN}36     ${CYBL}txt ${CYRD}txt ${CYGR}txt ${CYYW}txt ${CYBU}txt ${CYMG}txt ${CYCY}txt ${CYWH}txt ${N}"
echo -e "  ${WHT}37     ${WHBL}txt ${WHRD}txt ${WHGR}txt ${WHYW}txt ${WHBU}txt ${WHMG}txt ${WHCY}txt ${WHWH}txt ${N}"
echo -e "  ${BBL}1;30   ${BBBL}txt ${BBRD}txt ${BBGR}txt ${BBYW}txt ${BBBU}txt ${BBMG}txt ${BBCY}txt ${BBWH}txt ${N}"
echo -e "  ${BRD}1;31   ${BRBL}txt ${BRRD}txt ${BRGR}txt ${BRYW}txt ${BRBU}txt ${BRMG}txt ${BRCY}txt ${BRWH}txt ${N}"
echo -e "  ${BGR}1;32   ${BGBL}txt ${BGRD}txt ${BGGR}txt ${BGYW}txt ${BGBU}txt ${BGMG}txt ${BGCY}txt ${BGWH}txt ${N}"
echo -e "  ${BYW}1;33   ${BYBL}txt ${BYRD}txt ${BYGR}txt ${BYYW}txt ${BYBU}txt ${BYMG}txt ${BYCY}txt ${BYWH}txt ${N}"
echo -e "  ${BBU}1;34   ${BEBL}txt ${BERD}txt ${BEGR}txt ${BEYW}txt ${BEBU}txt ${BEMG}txt ${BECY}txt ${BEWH}txt ${N}"
echo -e "  ${BMG}1;35   ${BMBL}txt ${BMRD}txt ${BMGR}txt ${BMYW}txt ${BMBU}txt ${BMMG}txt ${BMCY}txt ${BMWH}txt ${N}"
echo -e "  ${BCY}1;36   ${BCBL}txt ${BCRD}txt ${BCGR}txt ${BCYW}txt ${BCBU}txt ${BCMG}txt ${BCCY}txt ${BCWH}txt ${N}"
echo -e "  ${BWH}1;37   ${BWBL}txt ${BWRD}txt ${BWGR}txt ${BWYW}txt ${BWBU}txt ${BWMG}txt ${BWCY}txt ${BWWH}txt ${N}"
echo -e "\e[4;37;40m                ${N}"
# Basic Attributes
echo -e " 4;FG;BGm = \e[4;37;40mUnderline${N}"
echo -e " 1;FG;BGm = \e[1;37;40mBold${N}"
echo -e " 9;FG;BGm = \e[9;37;40mStrikethrough${N}"
echo -e "  \e[4;37;40m                                                                                          ${N}"
