def _get_true_palette_entry(self, name, digits):
values = None<EOL>type_digits = type(digits)<EOL>is_fbterm = (env.TERM == '<STR_LIT>')  <EOL>if '<STR_LIT>' in self._palette_support:  <EOL><INDENT>values = [self._start_codes_true]<EOL>if type_digits is str:  <EOL><INDENT>if len(digits) == <NUM_LIT:3>:<EOL><INDENT>values.extend(str(int(ch + ch, <NUM_LIT:16>)) for ch in digits)<EOL><DEDENT>else:  <EOL><INDENT>values.extend(str(int(digits[i:i+<NUM_LIT:2>], <NUM_LIT:16>)) for i in (<NUM_LIT:0>, <NUM_LIT:2> ,<NUM_LIT:4>))<EOL><DEDENT><DEDENT>else:  <EOL><INDENT>values.extend(str(digit) for digit in digits)<EOL><DEDENT><DEDENT>elif '<STR_LIT>' in self._palette_support:<EOL><INDENT>if type_digits is str:<EOL><INDENT>nearest_idx = find_nearest_color_hexstr(digits,<EOL>method=self._dg_method)<EOL><DEDENT>else:  <EOL><INDENT>if type(digits[<NUM_LIT:0>]) is str:  <EOL><INDENT>digits = tuple(int(digit) for digit in digits)<EOL><DEDENT>nearest_idx = find_nearest_color_index(*digits,<EOL>method=self._dg_method)<EOL><DEDENT>start_codes = self._start_codes_extended<EOL>if is_fbterm:<EOL><INDENT>start_codes = self._start_codes_extended_fbterm<EOL><DEDENT>values = [start_codes, str(nearest_idx)]<EOL><DEDENT>elif '<STR_LIT>' in self._palette_support:<EOL><INDENT>if type_digits is str:<EOL><INDENT>nearest_idx = find_nearest_color_hexstr(digits, color_table4,<EOL>method=self._dg_method)<EOL><DEDENT>else:  <EOL><INDENT>if type(digits[<NUM_LIT:0>]) is str:  <EOL><INDENT>digits = tuple(int(digit) for digit in digits)<EOL><DEDENT>nearest_idx = find_nearest_color_index(*digits,<EOL>color_table=color_table4,<EOL>method=self._dg_method)<EOL><DEDENT>values = self._index_to_ansi_values(nearest_idx)<EOL><DEDENT>return (self._create_entry(name, values, fbterm=is_fbterm)<EOL>if values else empty)<EOL>
Compute truecolor entry, once on the fly.

            values must become sequence of decimal int strings: ('1', '2', '3')