No description
Find a file
2017-06-14 21:57:32 +02:00
src Fix hiding truecolor 2017-06-14 21:57:32 +02:00
.gitignore Use up to date termcap file 2015-10-19 02:35:25 +02:00
LICENSE first commit 2015-09-22 02:03:01 +02:00
Makefile Merge branch 'master' of github.com:project-fifo/cf 2017-06-14 21:44:51 +02:00
mk-termcap.escript Simplify color capability detection. 2015-10-19 04:20:00 +02:00
README.md Add underline and bold only codes 2015-09-22 17:08:46 +02:00
rebar.config Add truecolor 2017-06-14 21:44:42 +02:00
rebar.lock Simplify color capability detection. 2015-10-19 04:20:00 +02:00

cf

A helper library for termial colour printing extending the io:format syntax to add colours.

%% Effectively the same as io:format just takes the additional color
%% console text colour can be set by ~!**<colour>**.  ~#**<colour>**
%% will change the background. Both ~# only work with lowercase colours.
%% An uppercase letersindicate bold colours.
%%
%% The colour can be one of:
%%
%%   !   - resets the output
%%   ^   - bold (no colour change)
%%   __  - (two _) makes text underlined (no colour change)
%%   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

Usage

cf:format/[1,2] - an equivalent to io_lib:format/[1,2]. cf:print/[1,2] - an equivalent to io:format/[1,2].