def sub_from_color(color, value):
    """Subtract value from a color."""
    sub = lambda v: (v - value) % 256
    if isinstance(color, int):
        return sub(color)
    return tuple(map(sub, color))