IO ANSI Plus

Build Status

Functionality to render ANSI escape sequences. Clone of IO.ANSI supporting named Xterm colors.

Installation

Add the :io_ansi_plus dependency to your mix.exs file:

def deps do
[
{:io_ansi_plus, "~> 0.1"}
]
end

Notes

In addition to the 16 regular ANSI colors* and their background counterparts, this package also supports the 256 Xterm colors (foreground and background).

Most of these 256 colors were given names like:

For details, see file config/persist_colors.exs.

Also provides a shortcut to skip the format call in the following expression:

["Hello, ", :brown, "world!"] |> IO.ANSI.Plus.format(true) |> IO.puts()

The above expression can be shortened to:

["Hello, ", :brown, "world!"] |> IO.ANSI.Plus.puts(true)

* Actually 8 colors and their "bright" variants.

Examples

examples