ansi

ANSI escape code library for Erlang.

Features

Color Tool

colortool screenshot

ansi includes a color helper CLI tool that can be used to enumerate colors.

Usage

$ _build/tool/bin/colortool --help
usage: colortool [-b BACKGROUNDS] [-f FOREGROUNDS] [-t TEXT]

Optional arguments:
  -b, --backgrounds The set of background colors to enumerate ('0..16')
  -f, --foregrounds The set of foreground colors to enumerate ('0..16')
  -t, --text        The example text to display

The color ranges should be a comma separated list of either individual color codes or a range in the format FROM..TO. Each color code must be between 0 and 255. Example:

0..8,16,232..255

Build

$ rebar3 as tool escriptize

This produces a binary at _build/tool/bin/colortool.