A Clojure library to stylized string in console using ANSI escape code.
;For leiningen,add to your require
[colorstr "0.1.0"]
-> (println (style "Its red" :red))
=> "Its red" ;text color is red
-> (println (style "Its bright and red,backgroud is blue" :red :bright :bg-blue))
;All style you can select.
{:strikethrough-off
:strikethrough
:inverse-off
:inverse
:underline-off
:underline
:blink-slow
:bright
:reset
:default
:white
:black
:red
:green
:blue
:yellow
:megenta
:cyan
:bg-default
:bg-white
:bg-black
:bg-red
:bg-green
:bg-blue
:bg-yellow
:bg-megenta
:bg-cyan
}
;same class will be cover
-> (style "red" :blue :red)
;Same as (style "red" :red)
MIT.