Anansi v0.0.1 Anansi.Text
ANSI escape codes that format, color, and change the font of terminal text.
Summary
Functions
Sets the text color to :black
where context
is :foreground
or :background
Sets :blink
format to state
:on
or :off
Sets the text color to :blue
where context
is :foreground
or :background
Sets bold
format to state
:on
or :off
Sets the foreground text color to color
Sets the text color to color
where context
is :foreground
or :background
Sets conceal
format to state
:on
or :off
Sets the text color to :cyan
where context
is :foreground
or :background
Sets faint
format to state
:on
or :off
Sets the text font to an alternate font
if available
Activates text to display with given format
Sets format
format to state
:on
or :off
Sets the text color to :green
where context
is :foreground
or :background
Sets invert
format to state
:on
or :off
Sets italic
format to state
:on
or :off
Sets the text color to :magenta
where context
is :foreground
or :background
Sets the text color to :red
where context
is :foreground
or :background
Resets text formatting, font, and color
Sets reveal
format to state
:on
or :off
Sets strikethrough
format to state
:on
or :off
Sets underline
format to state
:on
or :off
Sets the text color to :white
where context
is :foreground
or :background
Convenience function to insert io data into a sequence via Anansi.Sequence.compose/1
Sets the text color to :yellow
where context
is :foreground
or :background
Functions
Sets the text color to :black
where context
is :foreground
or :background
.
Sets :blink
format to state
:on
or :off
.
Supported states: :on
, :slow
, :fast
, :off
.
The default :on
state is equivalent to :slow
to keep parity with other format functions.
Sets the text color to :blue
where context
is :foreground
or :background
.
Sets the foreground text color to color
.
Supported colors: :black
, :red
, :green
, :yellow
, :blue
, :magenta
, :cyan
, :white
, :default
.
See color/2
to set the background instead.
You can also set the color to a specific value in the range 0..256
or to an
{r, g, b}
tuple where each element is also in the range 0..256
.
Alternatively, the color
can be a keyword list to set both foreground and background in one go via color/2
.
Sets the text color to color
where context
is :foreground
or :background
.
Supported colors: :black
, :red
, :green
, :yellow
, :blue
, :magenta
, :cyan
, :white
, :default
.
You can also set the color to a specific value in the range 0..256
or to an
{r, g, b}
tuple where each element is in the range 0..256
.
Sets the text color to :cyan
where context
is :foreground
or :background
.
Sets the text font to an alternate font
if available.
Supported fonts are in the range 0..9
where 0
is the default font and 1..9
correspond to the available alternate fonts.
The :default
type
is equivalent to font type 0
.
Activates text to display with given format
.
Supported formats: :bold
, :faint
, :italic
, :underline
, :invert
, :conceal
, :strikethrough
, :reveal
, :blink
.
The :blink
format is set to :slow
rather than :fast
, this can be controlled via format/2
.
Alternatively, the format
can be a keyword list of formats and states to use via format/2
.
Sets format
format to state
:on
or :off
.
Supported formats: :bold
, :faint
, :italic
, :underline
, :invert
, :conceal
, :strikethrough
, :reveal
, :blink
.
You can also use the :blink
format with ‘:slow’ or ‘:fast’; :on
corresponds to :slow
.
Sets the text color to :green
where context
is :foreground
or :background
.
Sets the text color to :magenta
where context
is :foreground
or :background
.
Sets the text color to :red
where context
is :foreground
or :background
.
Sets the text color to :white
where context
is :foreground
or :background
.
Convenience function to insert io data into a sequence via Anansi.Sequence.compose/1
.