View Source ExAequoColors (ExAequoColors v0.1.0)
Features
ANSI Colors
Extended ANSI Color, suffixs
colorize
CLI
Summary
Functions
ANSI code for a color to a string
We can use the 8 basic ANSI color codes
Convenience delegation
Functions
ANSI code for a color to a string
We can use the 8 basic ANSI color codes
iex(1)> col("This is red", :red)
"\e[31mThis is red"
Or we can add a reset
iex(2)> col("This is red", :red, :reset)
"\e[31mThis is red\e[0m"
Which can also be achieved by means of the colr
function
iex(3)> colr("This is red", :red)
"\e[31mThis is red\e[0m"
We can also add bold or dim
iex(4)> col("Bold and blue", :bold, :blue)
"\e[1m\e[34mBold and blue"
iex(5)> col("Green and dim", :green, :dim)
"\e[32m\e[2mGreen and dim"
Convenience delegation