From the ls man page:
By default, color is not used to distinguish types of files. That is equivalent to using --color=none. Using the --color option without the optional WHEN argument is equivalent to using --color=always. With --color=auto, color codes are output only if standard output is connected to a terminal (tty). The environment variable LS_COLORS can influence the colors, and can be set easily by the dircolors command.
Have you tried the --color=always option?
In reply to Re: Capturing ANSI color escape codes with backticks
by shawnhcorey
in thread Capturing ANSI color escape codes with backticks
by Mr_Micawber
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |