Skip to content

Miloas/colorstr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

colorstr

A Clojure library to stylized string in console using ANSI escape code.

Usage

;For leiningen,add to your require
[colorstr "0.1.0"]

Example

-> (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            
  }

Tips

;same class will be cover

-> (style "red" :blue :red)
;Same as (style "red" :red)

License

MIT.

About

A Clojure library to stylized string in console using ANSI escape code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published