class_docstr: Inspired by pygments/formatters/terminal256.py
class_docstr_tok: ["Inspired","by","pygments\/formatters\/terminal256.py"]
docstr: Return the color for use in the
  `windll.kernel32.SetConsoleTextAttribute` API call.
  
  :param bg_color: Background as text. E.g. 'ffffff' or 'red'
docstr_tok: ["Return","the","color","for","use","in","the","`","windll.kernel32.SetConsoleTextAttribute","`","API","call",".",":","param","bg_color",":","Background","as","text",".","E.g",".","'ffffff","'","or","'red","'"]
code: def lookup_bg_color(self, bg_color):
      """
      Return the color for use in the
      `windll.kernel32.SetConsoleTextAttribute` API call.
  
      :param bg_color: Background as text. E.g. 'ffffff' or 'red'
      """
      # Background.
      if bg_color in BG_ANSI_COLORS:
          return BG_ANSI_COLORS[bg_color]
      else:
          return self._color_indexes(bg_color)[1]
  
imports: from __future__ import unicode_literals
  from ctypes import windll, byref, ArgumentError, c_char, c_long, c_ulong, c_uint, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from prompt_toolkit.renderer import Output
  from prompt_toolkit.styles import ANSI_COLOR_NAMES
  from prompt_toolkit.win32_types import CONSOLE_SCREEN_BUFFER_INFO, STD_OUTPUT_HANDLE, STD_INPUT_HANDLE, COORD, SMALL_RECT
  import os
  import six
label_desc: Use image node_id 6 for calling the ColorLookupTable obj's underlying member method code with example usage: obj.lookup_bg_color(bg_color) and returns: BG_ANSI_COLORS, self