Class: WhirledPeas::Settings::BgColor

Inherits:
Color
  • Object
show all
Defined in:
lib/whirled_peas/settings/bg_color.rb

Constant Summary collapse

BG_OFFSET =
10
BLACK =
new(Utils::Ansi::BLACK + BG_OFFSET)
RED =
new(Utils::Ansi::RED + BG_OFFSET)
GREEN =
new(Utils::Ansi::GREEN + BG_OFFSET)
YELLOW =
new(Utils::Ansi::YELLOW + BG_OFFSET)
BLUE =
new(Utils::Ansi::BLUE + BG_OFFSET)
MAGENTA =
new(Utils::Ansi::MAGENTA + BG_OFFSET)
CYAN =
new(Utils::Ansi::CYAN + BG_OFFSET)
WHITE =
new(Utils::Ansi::WHITE + BG_OFFSET)
GRAY =
BLACK.bright
DEFAULT =

Use system defined default

nil

Instance Method Summary collapse

Instance Method Details

#as_text_colorObject



23
24
25
# File 'lib/whirled_peas/settings/bg_color.rb', line 23

def as_text_color
  TextColor.new(code - BG_OFFSET, bright?)
end