class_docstr: Inspired by pygments/formatters/terminal256.py
class_docstr_tok: ["Inspired","by","pygments\/formatters\/terminal256.py"]
docstr: Build an RGB-to-256 color conversion table
docstr_tok: ["Build","an","RGB-to-256","color","conversion","table"]
code: def _build_color_table() -> list[tuple[int, int, int, int, int]]:
      """
      Build an RGB-to-256 color conversion table
      """
      FG = FOREGROUND_COLOR
      BG = BACKGROUND_COLOR
  
      return [
          (0x00, 0x00, 0x00, FG.BLACK, BG.BLACK),
          (0x00, 0x00, 0xAA, FG.BLUE, BG.BLUE),
          (0x00, 0xAA, 0x00, FG.GREEN, BG.GREEN),
          (0x00, 0xAA, 0xAA, FG.CYAN, BG.CYAN),
          (0xAA, 0x00, 0x00, FG.RED, BG.RED),
          (0xAA, 0x00, 0xAA, FG.MAGENTA, BG.MAGENTA),
          (0xAA, 0xAA, 0x00, FG.YELLOW, BG.YELLOW),
          (0x88, 0x88, 0x88, FG.GRAY, BG.GRAY),
          (
              0x44,
              0x44,
              0xFF,
              FG.BLUE | FG.INTENSITY,
              BG.BLUE | BG.INTENSITY,
          ),
          (
              0x44,
              0xFF,
              0x44,
              FG.GREEN | FG.INTENSITY,
              BG.GREEN | BG.INTENSITY,
          ),
          (
              0x44,
              0xFF,
              0xFF,
              FG.CYAN | FG.INTENSITY,
              BG.CYAN | BG.INTENSITY,
          ),
          (
              0xFF,
              0x44,
              0x44,
              FG.RED | FG.INTENSITY,
              BG.RED | BG.INTENSITY,
          ),
          (
              0xFF,
              0x44,
              0xFF,
              FG.MAGENTA | FG.INTENSITY,
              BG.MAGENTA | BG.INTENSITY,
          ),
          (
              0xFF,
              0xFF,
              0x44,
              FG.YELLOW | FG.INTENSITY,
              BG.YELLOW | BG.INTENSITY,
          ),
          (
              0x44,
              0x44,
              0x44,
              FG.BLACK | FG.INTENSITY,
              BG.BLACK | BG.INTENSITY,
          ),
          (
              0xFF,
              0xFF,
              0xFF,
              FG.GRAY | FG.INTENSITY,
              BG.GRAY | BG.INTENSITY,
          ),
      ]
  
imports: from __future__ import annotations
  import sys
  import os
  from ctypes import ArgumentError, byref, c_char, c_long, c_uint, c_ulong, pointer
  from ctypes.wintypes import DWORD, HANDLE
  from typing import Callable, TextIO, TypeVar
  from prompt_toolkit.cursor_shapes import CursorShape
  from prompt_toolkit.data_structures import Size
  from prompt_toolkit.styles import ANSI_COLOR_NAMES, Attrs
  from prompt_toolkit.utils import get_cwidth
  from prompt_toolkit.win32_types import CONSOLE_SCREEN_BUFFER_INFO, COORD, SMALL_RECT, STD_INPUT_HANDLE, STD_OUTPUT_HANDLE
  from ..utils import SPHINX_AUTODOC_RUNNING
  from .base import Output
  from .color_depth import ColorDepth
label_desc: Use image node_id 2 for calling the ColorLookupTable obj's underlying member method code with example usage: obj._build_color_table() and returns: list