I specifically use bash on Mac OS X, but I think the answer would be Unix-generic.
I'm already using ANSI colors, but I'd like to reassign different colors to folders, hidden files, etc.
Update:
This wasn't as useful as I expected, as you can't assign a specific color to hidden files, and also directories can't always be colored the same, as the sticky permission bits color takes precedence over directories (olive green in the screenshot)
Best Answer
Modify your ~/.profile with the following. You could also put this in your ~/.bashrc or ~/.bash_profile depending on what you already have and use. NOTE: this shows the default color setup. Change the first e to a B if you want to see red directories.
Save your ~/.profile and then do a:
From the command line.
Here are the different color settings and order of attributes from the ls man page: