Module cf

Printing library for coloured console output, extends the format strings by adding ~!

Copyright © (C) 2015, Project-FiFo UG

Authors: Heinz Nikolaus Gies <heinz@project-fifo.net>.

Description

Printing library for coloured console output, extends the format strings by adding ~! (forground) ~# (background) and ~_ (underline) terminal colours.

Function Index

format/1
format/2Formates a coloured string Arguments are the same as for print/2, just returns a string as io_lib:format/2 does instead of printing it to stdout.
print/1
print/2Prints a coloured string.

Function Details

format/1

format(Fmt) -> any()

format/2

format(Fmt, Args) -> any()

Formates a coloured string Arguments are the same as for print/2, just returns a string as io_lib:format/2 does instead of printing it to stdout.

print/1

print(Fmt) -> any()

print/2

print(Fmt, Args) -> any()

Prints a coloured string. 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. A '_' can be added after the ~! to make the text underlined.

The colour can be one of:

! - resets the output ^ - makes text bold 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


Generated by EDoc, Sep 22 2021, 00:37:06.