module

ChalkBox::Styles

Inherits ChalkBox::Styles::Private::Reset

ANSI escape codes for styling strings in the terminal

This module is based in chalk/ansi-styles

Usage

require "chalk-box"
include ChalkBox::Styles

puts "#{red}Red#{reset}"
puts "#{green.open}Green#{green.close}"

API

Each style has an open and close property (except reset)

Instance methods

bgBlack
bgBlue
bgColor
Source
bgCyan
bgDarkGray
bgDarkGrey
bgGray
bgGreen
bgGrey
bgLightBlue
bgLightCyan
bgLightGray
bgLightGreen
bgLightGrey
bgLightMagenta
bgLightRed
bgLightYellow
bgMagenta
bgRed
bgWhite
bgYellow
black
blue
bold
bright
color
Source
cyan
dark_gray
dark_grey
dim
gray
green
grey
hidden
light_blue
light_cyan
light_gray
light_green
light_grey
light_magenta
light_red
light_yellow
magenta
modifier
Source
red
reverse
underline
white
yellow

Nested types