module Ccp::Utils::Colorize::Fore

examples

Ccp::Utils::Colorize::Fore.red(“hello”) Ccp::Utils::Colorize::Back.red(“hello”) Ccp::Utils::Colorize.red(“hello”) # same as Fore Ccp::Utils::Colorize.strip(ansi_color_string) Ccp::Utils::Colorize::Bar.success("[%s]“, 10, 0.5) # => ”[|||| ]“

Constants

BLACK
BLUE
CLEAR
CYAN
GREEN
MAGENTA
RED
WHITE
YELLOW

Public Instance Methods

aqua(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 33
def aqua   (text) CYAN    + text.to_s + CLEAR; end
black(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 24
def black  (text) BLACK   + text.to_s + CLEAR; end
blue(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 28
def blue   (text) BLUE    + text.to_s + CLEAR; end
colorize(text, code) click to toggle source
# File lib/ccp/utils/colorize.rb, line 22
def colorize(text, code); code + text.to_s + CLEAR; end
cyan(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 32
def cyan   (text) CYAN    + text.to_s + CLEAR; end
green(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 26
def green  (text) GREEN   + text.to_s + CLEAR; end
magenta(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 29
def magenta(text) MAGENTA + text.to_s + CLEAR; end
pink(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 31
def pink   (text) MAGENTA + text.to_s + CLEAR; end
purple(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 30
def purple (text) MAGENTA + text.to_s + CLEAR; end
red(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 25
def red    (text) RED     + text.to_s + CLEAR; end
white(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 34
def white  (text) WHITE   + text.to_s + CLEAR; end
yellow(text) click to toggle source
# File lib/ccp/utils/colorize.rb, line 27
def yellow (text) YELLOW  + text.to_s + CLEAR; end