fatbotslim.irc.colors

This module provides message colors capabilities.

class fatbotslim.irc.colors.ColorMessage(content, color='black', bold=False, underline=False, highlight=False)[source]

Allows to create colorized strings. Created objects behave like real strings, allowing to call str methods.

Parameters:
  • content (unicode) – message to colorize.
  • color (str) – one of fatbotslim.irc.colors.ColorMessage._colors.
  • bold (bool) – if the string has to be in bold.
  • underline (bool) – if the string has to be underlined.
  • highlight (bool) – if the string foreground and background has to be switched.
static colorize(string, color='black', bold=False, underline=False, highlight=False)[source]
Parameters:
  • string (unicode) – message to colorize.
  • color (str) – one of fatbotslim.irc.colors.ColorMessage._colors.
  • bold (bool) – if the string has to be in bold.
  • underline (bool) – if the string has to be underlined.
  • highlight (bool) – if the string foreground and background has to be switched.