exchalk v1.0.0 ExChalk

Provides a simple interface to text color and styling.

ExChalk exposes three APIs: colors, background colors, and modifiers.

Colors

ExChalk.color_name(text) will color text with color_name color.

Supported colors are:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • gray

Example: ExChalk.red("Hello!")

Background colors

ExChalk.bg_color_name(text) will color text with bg_color_name background color.

Supported background colors are:

  • bg_black
  • bg_red
  • bg_green
  • bg_yellow
  • bg_blue
  • bg_magenta
  • bg_cyan
  • bg_white

Example: ExChalk.bg_red("Hello!")

Modifiers

ExChalk.modifier(text) will style text with a given modifier.

Supported modifiers are:

  • reset
  • bold
  • dim
  • italic
  • underline
  • inverse
  • hidden
  • strikethrough

Example: ExChalk.italic("Hello!")

Summary

Functions

bg_black(str)
bg_blue(str)
bg_cyan(str)
bg_green(str)
bg_magenta(str)
bg_red(str)
bg_white(str)
bg_yellow(str)
black(str)
blue(str)
bold(str)
cyan(str)
dim(str)
gray(str)
green(str)
grey(str)
hidden(str)
inverse(str)
italic(str)
magenta(str)
red(str)
reset(str)
strikethrough(str)
to_str(list)
underline(str)
white(str)
yellow(str)