Class: Termplot::Colors
- Inherits:
-
Object
- Object
- Termplot::Colors
- Defined in:
- lib/termplot/colors.rb
Constant Summary collapse
- COLORS =
{ black: 0, light_black: 60, red: 1, light_red: 61, green: 2, light_green: 62, yellow: 3, light_yellow: 63, blue: 4, light_blue: 64, magenta: 5, light_magenta: 65, cyan: 6, light_cyan: 66, white: 7, light_white: 67, default: 9 }
- MODES =
{ default: 0, bold: 1, italic: 3, underline: 4, blink: 5, swap: 7, hide: 8 }
Class Method Summary collapse
Class Method Details
.fetch(color, default) ⇒ Object
43 44 45 |
# File 'lib/termplot/colors.rb', line 43 def fetch(color, default) COLORS.key?(color.to_sym) ? color.to_sym : default.to_sym end |