def getDimmedRGB(color, alpha=255):
    """Returns dimmed RGB values, with low and high pass to ensure LEDs are fully off or on"""
    if alpha >= 253:  # int is 1
        return color
    elif alpha <= 2:  # int is 0
        return 0, 0, 0
    else:
        p = alpha/255.0
        r, g, b = color
        return int(r*p), int(g*p), int(b*p)