I've been messing around with `.bashrc`, trying to get a new colored `PS1` that could tell me automagically if I'm using a Python virtualenv. I'm very, very new to Bash, so after some research I created something like this (simplified for clarity):

```
function virtualenv {
    if [ -n "$VIRTUAL_ENV" ]; then
        VIRTUAL=" $BLACK($GREEN`basename $VIRTUAL_ENV`$BLACK)"
    else
        VIRTUAL=""
    fi
}

PS1="$BLUE\u@\h\$VIRTUAL $YELLOW\\$ $RESET"

```

in hope that the `$BLACK` and `$GREEN` variables would be interpreted in `PS1`, but instead I got something like this:

```
gabe@notebook \e[30m(\e[32mmyproject\e[30m) $

```

as if Bash was escaping my entire `VIRTUAL` variable, on its own... I've already tried every combination of slash, quotes and commands my limited skill allowed... Any help?