Don't do this. The default (since 1.8.4) is auto, which adds colors if the output goes to a terminal, but doesn't if the output goes somewhere else (e.g., a pipe). That is probably what you want (and already have).
I fell for this myself at some point. Somehow expecting there to be more colors, or full color support, or something like that — Nope.