Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miloas/colorstr
A Clojure library to stylized string in console using ANSI escape code.
https://github.com/miloas/colorstr
Last synced: 8 days ago
JSON representation
A Clojure library to stylized string in console using ANSI escape code.
- Host: GitHub
- URL: https://github.com/miloas/colorstr
- Owner: Miloas
- Created: 2015-08-13T04:59:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-13T10:18:46.000Z (over 9 years ago)
- Last Synced: 2024-07-10T17:35:00.289Z (4 months ago)
- Language: Clojure
- Size: 121 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# colorstr
A Clojure library to stylized string in console using ANSI escape code.
## Usage
```clojure
;For leiningen,add to your require
[colorstr "0.1.0"]
```
## Example```clojure
-> (println (style "Its red" :red))
=> "Its red" ;text color is red-> (println (style "Its bright and red,backgroud is blue" :red :bright :bg-blue))
``````clojure
;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
```clojure
;same class will be cover-> (style "red" :blue :red)
;Same as (style "red" :red)```
## LicenseMIT.