(defn colorize
"Wrap text in color if nonempty && *colorize* true, else return text."
[text color]
(let [text (str text)]
(if (and (config/colorize) (seq text))
(str (str->ansi-color-str color) text (str->ansi-color-str :black))
text)))
Comments top
No comments for colorize. Log in to add a comment.