def xterm_to_rgb(xcolor):
    """Convert xterm Color ID to an RGB value

    All 256 values are precalculated and stored in :data:`COLOR_TABLE`
    """
    assert 0 <= xcolor <= 255
    if xcolor < 16:
        # basic colors
        return BASIC16[xcolor]
    elif 16 <= xcolor <= 231:
        # color cube
        xcolor -= 16
        return (CUBE_STEPS[(xcolor / 36) % 6],
                CUBE_STEPS[(xcolor / 6) % 6],
                CUBE_STEPS[xcolor % 6])
    elif 232 <= 255 <= xcolor:
        # gray tone
        c = 8 + (xcolor - 232) * 0x0A
        return (c, c, c)
dataset/ETHPy150Open jart/fabulous/fabulous/xterm256.py/xterm_to_rgb/swapped operands of `<=`