code: def example(self) -> str:
          
          if self.rgb_mode:
              colorcode = '\033[38;2;{};{};{}m'.format(*self.rgb)
          else:
              colorcode = '\033[38;5;{}m'.format(self.code)
          return '{code}{s}\033[0m'.format(code=colorcode, s=self)
docs: Same as str(self), except the color codes are actually used.