docs: def _resolve_color(self, color):
          """Resolve a color like red or on_bright_green into a callable
          capability."""
          # TODO: Does curses automatically exchange red and blue and cyan and
          # yellow when a terminal supports setf/setb rather than setaf/setab?
          # I'll be blasted if I can find any documentation. The following
          # assumes it does.
          color_cap = (self._background_color if 'on_' in color else
                       self._foreground_color)
          # curses constants go up to only 7, so add an offset to get at the
          # bright colors at 8-15:
          offset = 8 if 'bright_' in color else 0
          base_color = color.rsplit('_', 1)[-1]
          return self._formatting_string(
              color_cap(getattr(curses, 'COLOR_' + base_color.upper()) + offset))