Term2::Color
Color represents terminal colors (ANSI, 256-color, or TrueColor)
Constants
ANSI16_PALETTE = [{0, 0, 0}, {205, 0, 0}, {0, 205, 0}, {205, 205, 0}, {0, 0, 238}, {205, 0, 205}, {0, 205, 205}, {229, 229, 229}, {127, 127, 127}, {255, 0, 0}, {0, 255, 0}, {255, 255, 0}, {92, 92, 255}, {255, 0, 255}, {0, 255, 255}, {255, 255, 255}]
BLACK = new(Type::Named, 0)
Named colors (ANSI 16)
BLUE = new(Type::Named, 4)
BRIGHT_BLACK = new(Type::Named, 8)
Bright named colors
BRIGHT_BLUE = new(Type::Named, 12)
BRIGHT_CYAN = new(Type::Named, 14)
BRIGHT_GREEN = new(Type::Named, 10)
BRIGHT_MAGENTA = new(Type::Named, 13)
BRIGHT_RED = new(Type::Named, 9)
BRIGHT_WHITE = new(Type::Named, 15)
BRIGHT_YELLOW = new(Type::Named, 11)
CYAN = new(Type::Named, 6)
GREEN = new(Type::Named, 2)
MAGENTA = new(Type::Named, 5)
RED = new(Type::Named, 1)
WHITE = new(Type::Named, 7)
YELLOW = new(Type::Named, 3)
Constructors
Create from hex string like "#FF5500", "FF5500", "#F50", or "F50"
Class methods
Instance methods
to_rgb
Sourcetype
Sourcevalue
Source