class Dex::UI::Color

Constants

BLUE
BOLD
CYAN
GREEN
MAGENTA
MAP
RED
RESET
WHITE
YELLOW

Attributes

code[R]
name[R]
sgr[R]

Public Class Methods

available() click to toggle source
# File lib/dex/ui/color.rb, line 52
def self.available
  MAP.keys
end
lookup(name) click to toggle source
# File lib/dex/ui/color.rb, line 46
def self.lookup(name)
  MAP.fetch(name)
rescue KeyError
  raise InvalidColorName, name
end
new(sgr, name) click to toggle source
# File lib/dex/ui/color.rb, line 7
def initialize(sgr, name)
  @sgr  = sgr
  @code = Dex::UI::ANSI.sgr(sgr)
  @name = name
end