Module: Klogger::Colors
- Defined in:
- lib/klogger/colors.rb
Constant Summary collapse
- COLORS =
{ info: 75, warn: 220, debug: 252, error: 203, fatal: 203, white: 255, gray: 243 }.freeze
Class Method Summary collapse
Class Method Details
.colorize(text, color) ⇒ Object
18 19 20 21 |
# File 'lib/klogger/colors.rb', line 18 def colorize(text, color) color = COLORS[color] "\e[38;5;#{color}m#{text}\e[0m" end |