erlang-cf/README.md

38 lines
802 B
Markdown
Raw Normal View History

2015-09-22 02:03:01 +02:00
cf
=====
A helper library for termial colour printing extending the io:format
syntax to add colours.
```erlang
%% Effectively the same as io:format just takes the additional color
2015-09-22 02:03:10 +02:00
%% console text colour can be set by ~!**<colour>**. ~#**<colour>**
%% will change the background. Both ~# only work with lowercase colours.
2015-09-22 02:03:01 +02:00
%% An uppercase letersindicate bold colours.
%%
%% The colour can be one of:
%%
%% ! - resets the output
%% x,X - black
%% r,R - red
%% g,G - greeen
%% y,Y - yellow
%% b,B - blue
%% m,M - magenta
%% c,C - cyan
%% w,W - white
%%
%% The function will disable colours on non x term termials
```
Build
-----
$ rebar3 compile
2015-09-22 02:03:10 +02:00
Usage
-----
`cf:format/[1,2]` - an equivalent to `io_lib:format/[1,2]`.
`cf:print/[1,2]` - an equivalent to `io:format/[1,2]`.