OK, bash doesn't paint your directories in colors. It's the ls command that paints them.
The ls command uses some terminal codes to tell it to display the directory in blue.
The terminal codes are taken from the LS_COLORS environment variable.
try echo $LS_COLORS and you will see what I mean.
in LS_COLORS, there is a 'di=something', di is for directories and something is the code for your terminal to print in blue. The TERM environment variable tells you which terminal you are using.
Here are the codes for the xterm compatible terminals: