0.0.12 permalink Arrow_down_16x16
  • (colorize text color)
Wrap text in color if nonempty && *colorize* true, else return text.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source circumspec/colorize.clj:15 top

(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)))
Vars in circumspec.colorize/colorize: and defn let seq str
Used in 0 other vars

Comments top

No comments for colorize. Log in to add a comment.