code: def _index_to_ansi_values(self, index):
          ''' Converts an palette index to the corresponding ANSI color.
  
              Arguments:
                  index   - an int (from 0-15)
              Returns:
                  index as str in a list for compatibility with values.
          '''
          if self.__class__.__name__[0] == 'F':   # Foreground
              if index < 8:
                  index += ANSI_FG_LO_BASE
              else:
                  index += (ANSI_FG_HI_BASE - 8)  # 82
          else:                                   # Background
              if index < 8:
                  index += ANSI_BG_LO_BASE
              else:
                  index += (ANSI_BG_HI_BASE - 8)  # 92
          return [str(index)f _index_to_ansi_values(self, index):
          ''' Converts an palette index to the corresponding ANSI color.
  
              Arguments:
                  index   - an int (from 0-15)
              Returns:
                  index as str in a list for compatibility with values.
          '''
          if self.__class__.__name__[0] == 'F':   # Foreground
              if index < 8:
                  index += ANSI_FG_LO_BASE
              else:
                  index += (ANSI_FG_HI_BASE - 8)  # 82
          else:                                   # Background
              if index < 8:
                  index += ANSI_BG_LO_BASE
              else:
                  index += (ANSI_BG_HI_BASE - 8)  # 92
          return [str(index)]
docs: Converts an palette index to the corresponding ANSI color.
  
              Arguments:
                  index   - an int (from 0-15)
              Returns:
                  index as str in a list for compatibility with values.