module ClasslessMud::Colorizer
Constants
- CODES
To add more, look at this alias colortest=“python -c "print('n'.join([(' '.join([('033[38;5;' + str((i + j)) + 'm' + str((i + j)).ljust(5) + '033[0m') if i + j < 256 else '' for j in range(10)])) for i in range(0, 256, 10)]))"”
Public Instance Methods
colorize(input, color)
click to toggle source
# File lib/classless_mud/colorizer.rb, line 24 def colorize(input, color) color_code = CODES[color] "\e[#{color_code}m#{input}\e[0m" end