Erlang terminal colors
Erlang
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
README.md

README.md

etcol

Erlang terminal colors

Usage

etcol:t(Lines) -> string()

%% Types:

Lines = [ attr_line() ]
attr_line() = { [attrs()], string() }
attrs() = { text_attr, attr() } | { fg_color, color() } | { bg_color, color() } 
color() = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white'
attr() = 'reset' | 'bright' | 'dim' | 'underscore' | 'blink' | 'reverse' | 'hidden'

Demo

Try:

> erlc etcol
> erl -noshell -run ertcol test