def color_clamp(color):
    """
    Ensures a three part iterable is a properly formatted color.

    Parameters:
    color (tuple): RGB tuple

    Returns:
    color (tuple): Same color as input, as integers between 0 and 255
    """
    clamped_color = [max(min(int(i), 255), 0) for i in color]
    return tuple(clamped_color)