code: def color_text(text, color):
      r
      import utool as ut
      if color is None or not ENABLE_COLORS:
          return text
      elif color == 'python':
          return highlight_text(text, color)
      elif color == 'sql':
          return highlight_text(text, 'sql')
      try:
          import pygments
          import pygments.console
          # if color == 'guess':
          #     import linguist  # NOQA
          #     pygments.lexers.guess_lexer(text)
          #     return highlight_text(text, color)
          ansi_text = pygments.console.colorize(color, text)
          if ut.WIN32:
              import colorama
              ansi_reset = (colorama.Style.RESET_ALL)
          else:
              ansi_reset = pygments.console.colorize('reset', '')
          ansi_text = ansi_text + ansi_reset
          return ansi_text
      except ImportError:
          return text
docs: r"""
      SeeAlso:
          highlight_text
          lexer_shortnames = sorted(ut.flatten(ut.take_column(pygments.lexers.LEXERS.values(), 2)))