Using homebrew and zsh
homebrew coreutils [brew install coreutils] installs a dircolors equivalent called gdircolors
In the file .zshrc (at the end in my case), I put two lines
eval $(gdircolors ~/.dircolors) export LS_COLORS
and that did the trick. I seem to be able to use any of the colours 0-255 (but they don't all give the colours expected).
Code in ~/.dircolors :
The file begins with a list of TERM types to which this applies (my terminal is xterm-256color which seems to be the default in MacOS Terminal.app since MacOS 10.7). For the colors there's a list of items of the form
DIR 05;33 (not a recommended combination!!)
or
.zip 01;105
see the blog page on configuring-ls_colors
To list all colours (in zsh, needs modifying for other shells):
for i in {1..256}; do print -P "%F\{$i\}Color : $i"; done;
Note that these colours all seem to work in the prompt (defining PS1 etc in .zshrc) but not in ls. I haven't yet figured out which ones work - or how the different colours respond.
References
- http://www.bigsoft.co.uk/blog/2008/04/11/configuring-ls_colors
- https://superuser.com/questions/700406/zsh-not-recognizing-ls-colors
- https://stackoverflow.com/questions/689765/how-can-i-change-the-color-of-my-prompt-in-zsh-different-from-normal-text
