Liking cljdoc? Tell your friends :D

Lumiere

Lumiere is a Clojure library that allows you to output stylized text to the terminal using ANSI escape sequences.

Usage

Use leiningen,

(defproject your-project "1.0"
  :dependencies [[lumiere "1.0.0-SNAPSHOT"]])

Lumiere has a very simple API. To use it, simple use or require it in your namespace:

(ns your-namespace
  (:use [lumiere]))

and start decorating your text:

(print (str (red "Are you sure you want to quit? [Y/n]")))
(print (str (green "Continue")))
(print (str (bold (green "Have a nice day!"))))
(-> "Stop right there" red bold underline str print)
  • Available colours (functions) are:

    • black, bg-black
    • red, bg-red
    • green, bg-green
    • yellow, bg-yellow
    • blue, bg-blue
    • magenta, bg-magenta
    • cyan, bg-cyan
    • white, bg-white
  • Available styles (functions) are:

    • bold
    • italic (not supported on many terminals)
    • underline

License

Copyright (C) 2012 Kevin J. Qiu

Distributed under the Eclipse Public License, the same as Clojure.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close