docs: def _get_true_palette_entry(self, name, digits):
          ''' Compute truecolor entry, once on the fly.
  
              values must become sequence of decimal int strings: ('1', '2', '3')
          '''
          values = None
          type_digits = type(digits)
          is_fbterm = (env.TERM == 'fbterm')  # sigh
  
          if 'truecolor' in self._palette_support:  # build entry
              values = [self._start_codes_true]
              if type_digits is str:  # convert hex string
                  if len(digits) == 3:
                      values.extend(str(int(ch + ch, 16)) for ch in digits)
                  else:  # chunk 'BB00BB', to ints to 'R', 'G', 'B':
                      values.extend(str(int(digits[i:i+2], 16)) for i in (0, 2 ,4))
              else:  # tuple of str-digit or int, may not matter to bother:
                  values.extend(str(digit) for digit in digits)
  
          # downgrade section
          elif 'extended' in self._palette_support:
              if type_digits is str:
                  nearest_idx = find_nearest_color_hexstr(digits,
                                                         method=self._dg_method)
              else:  # tuple
                  if type(digits[0]) is str:  # convert to ints
                      digits = tuple(int(digit) for digit in digits)
                  nearest_idx = find_nearest_color_index(*digits,
                                                         method=self._dg_method)
  
              start_codes = self._start_codes_extended
              if is_fbterm:
                  start_codes = self._start_codes_extended_fbterm
  
              values = [start_codes, str(nearest_idx)]
  
          elif 'basic' in self._palette_support:
              if type_digits is str:
                  nearest_idx = find_nearest_color_hexstr(digits, color_table4,
                                                         method=self._dg_method)
              else:  # tuple
                  if type(digits[0]) is str:  # convert to ints
                      digits = tuple(int(digit) for digit in digits)
                  nearest_idx = find_nearest_color_index(*digits,
                                                         color_table=color_table4,
                                                         method=self._dg_method)
              values = self._index_to_ansi_values(nearest_idx)
  
          return (self._create_entry(name, values, fbterm=is_fbterm)
                  if values else empty)