ibdknox/colorize — pull request #1 by xsc (2013-06-19 12:57:16+00:00)
Title: Simple Disabling of Colorization

Colorization might look nice in-terminal but when e.g. writing output to a file it is probably desired to have ways to turn of this feature. This usually means writing wrappers around the desired colorization functions that check some condition (e.g. a variable set by the command-line-parser, an environment variable, ...) to decide whether the string shall be passed to the underlying routine or be returned unprocessed.

This pull request adds the dynamic variable `colorize.core/*disable-colors*` to have an easy way to locally turn off colorization:

```clojure
(use 'colorize.core)
(map int (red "RED"))
;; => (27 91 51 49 109 82 69 68 27 91 48 109)
(map int (binding [*disable-colors* true] (red "RED)))
;; => (82 69 68)
```

It is completely backwards-compatible, working even with Clojure 1.2.1 (whoever still uses that).