code: def to_irc(self):
          
          ignore_re = re.compile('[\x03\x02\x1D\x1F\x16\x0F]')
          text = ignore_re.sub('', self.text)
          if self.color and self.bg_color:
              return '\x03%02d,%02d%s' % (self.color.to_8bit().to_irc(),
                                          self.bg_color.to_8bit().to_irc(),
                                          text)
          elif self.color:
              c = self.color.to_8bit()
              if c.is_color():
                  return '\x03%02d%s' % (c.to_irc(), text)
              else:
                  return '\x03\x0f' + text
          elif self.bg_color:
              return '\x0301,%02d%s' % (self.bg_color.to_8bit().to_irc(), text)
          else:
              return '\x03\x0f' + text
docs: Convert to mIRC color format
          :return: