I was investigating how my copy of knoppix works, and as I was reading the file 'knoppix-autoconfig' I
found these variables with some weird strings being assigned to them:

# ANSI COLORS
CRE="^M^[[K"
NORMAL="^[[0;39m"
# RED: Failure or error message
RED="^[[1;31m"
# GREEN: Success message
GREEN="^[[1;32m"
# YELLOW: Descriptions
YELLOW="^[[1;33m"
# BLUE: System messages
BLUE="^[[1;34m"
# MAGENTA: Found devices or drivers
MAGENTA="^[[1;35m"
# CYAN: Questions
CYAN="^[[1;36m"
# BOLD WHITE: Hint
WHITE="^[[1;37m"


Later on in the script they are used like this:

KERNEL="$(uname -r)"
echo "${GREEN}Running Linux Kernel ${YELLOW}$KERNEL${GREEN}.${NORMAL}"


In another script I found something similar:

echo -e "\033[31m $VENDOR_TEXT \033[0m"

I believe the \033 is an escape sequence and the 31 means red, but I'm not sure.
I'm wondering is 31 the entire symbol or is it [31m that is the symbol?


I can tell that these are modifiers for the color of the text but I whould like to know
which part does what and where can I find a definition of these?

Thank-you

Tony Little