code: def lookup_fg_color(self, fg_color):
          
          # Foreground.
          if fg_color in FG_ANSI_COLORS:
              return FG_ANSI_COLORS[fg_color]
          else:
              return self._color_indexes(fg_color)[0]
docs: Return the color for use in the
          `windll.kernel32.SetConsoleTextAttribute` API call.
  
          :param fg_color: Foreground as text. E.g. 'ffffff' or 'red'