Why does this shell-script dim my bash colors?
Because your function told it to do so?

See wikipedia tput page, IBM tput tutorial  &amp; man tput  

Google bash prompt &amp; tput and you get quite a few suggestions on how to set up your prompt.  

Comment out the function you posted in your ~/.bash_profile.
Start a new terminal. Things should be normal again.