docs: def to_ansi_8bit(self):
          """
          Convert to ANSI 8-bit color format
          :return:
          """
          text = self.text.replace('\x1b', '')
          if self.color and self.bg_color:
              c = self.color.to_8bit()
              return ansicolor(text,
                               fg=c.to_name(),
                               bg=self.bg_color.to_8bit().to_name(),
                               style=c.bright and 'bold' or None)
          elif self.color:
              c = self.color.to_8bit()
              return ansicolor(text,
                               fg=c.is_color() and c.to_name(),
                               style=c.bright and 'bold' or None)
          elif self.bg_color:
              return ansicolor(text,
                               bg=self.bg_color.to_8bit().to_name())
          else:
              return text