Bash has no say about the colors that applications use, except of course what bash itself uses. Applications interact with the terminal; bash only starts them and notices when they finish.
Applications know how to talk with a terminal through the termcap (traditional) or terminfo (modeern) database. Termcap is older than colors, but terminfo does have some knowledge of colors. Look at the
terminfo(5) man page for a list of supported capabilities on your system. There's no way to specify control sequences for individual colors, but you can achieve essentially the same result by configuring the appearance of each color through the
initc capability. For example this changes the apperance of color 1 (normally red) to bright green:
tput initc 1 0 255 0
The ncurses database doesn't include this capability for
terminator or for
xterm though (as of version 5.9 on Debian jessie). However these terminal emulators (as well as any other terminal based on vte) do support an escape sequence which can be used for that purpose:
OSC 4 ; c ; spec BEL. This is how to make red into bright green:
The basic colors are numbered 0–7; bold text in those colors uses colors 8–15. You can also use
OSC 5 ; 0 ; spec BEL to change the color used for bold in the default color, and so on (see the control sequence list for details).
These settings affect both foreground and backgrouns colors, there's no way to affect foreground and background separately.
To customize the appearance of colors, you would output these control sequences from your
.bashrc. That would only affect terminals where you run an interactive instance of bash, not terminals where you start another application directly.
I don't know how this interacts with Terminator's color palette settings.