I am using bash on MacBook Air running macOS Mojave   and wanted to change the color of terminal prompt. 

I was helped [on this question on SO](https://stackoverflow.com/questions/56180624/how-to-change-font-color-of-text-in-vscode-integrated-terminal) and [this IBM blog](https://www.ibm.com/developerworks/linux/library/l-tip-prompt/) after which I used 

```
export PS1="\[\e[30;47m\]\W\[\e[30;47m\]$\[\e[0m\]"
```

which has colour, wrapping, working directory and `$`.


It changed the colour but the prompt doesn't have `(base)` or `(ml)` in it. 
It is the virtual environment I created using conda. `conda deactivate`  removes it. Originally,
```
$ echo $PS1
(base) \h:\W \u\$           #original prompt with base.

$ conda deactivate          
$ echo $PS1
\h:\W \u\$                  #original prompt with no environment.  
  
$ conda activate ml
$ echo $PS1
(ml) \h:\W \u\$             #original prompt with ml environment. 

$ export PS1="\[\e[30;47m\]\W\[\e[30;47m\]$\[\e[0m\]"
$ echo $PS1
\[\e[30;47m\]\W\[\e[30;47m\]$\[\e[0m\]    #new prompt with no environment 
                                          #while ml is active   
```

What can I include to have the `(base)` or `(ml)` there,  to make it like


```
$ echo $PS1
(base) \[\e[30;47m\]\W\[\e[30;47m\]$\[\e[0m\]    #expected result.
```

I didn't find any reference on [bash manual](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Controlling-the-Prompt) for virtual environment under controlling the prompt section.