

def _color_desc_88(num):
    "\n    Return a string description of color number num.\n    0..15 -> 'h0'..'h15' basic colors (as high-colors)\n    16..79 -> '#000'..'#fff' color cube colors\n    80..87 -> 'g18'..'g90' grays\n    \n    >>> _color_desc_88(15)\n    'h15'\n    >>> _color_desc_88(16)\n    '#000'\n    >>> _color_desc_88(17)\n    '#008'\n    >>> _color_desc_88(78)\n    '#ffc'\n    >>> _color_desc_88(81)\n    'g36'\n    >>> _color_desc_88(82)\n    'g45'\n\n    "
    assert ((num > 0) and (num < 88))
    if (num < _CUBE_START):
        return ('h%d' % num)
    if (num < _GRAY_START_88):
        num -= _CUBE_START
        (b, num) = ((num % _CUBE_SIZE_88), (num // _CUBE_SIZE_88))
        (g, r) = ((num % _CUBE_SIZE_88), (num // _CUBE_SIZE_88))
        return ('#%x%x%x' % (_CUBE_STEPS_88_16[r], _CUBE_STEPS_88_16[g], _CUBE_STEPS_88_16[b]))
    return ('g%d' % _GRAY_STEPS_88_101[(num - _GRAY_START_88)])

dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/display_common.py _color_desc_88/original