from typing import Any


def changeColour(colour: tuple, change_by: Any) -> tuple:
    """
    Changes the given colour with value, the clamps the colour ranges.
    :param colour: tuple[int, int, int]
    :param change_by: Any
    :return:
        - new_colour - tuple[int, int, int]
    """
    if isinstance(change_by, int):
        new_colour = [colour[i] + change_by for i in range(len(colour))]
    elif isinstance(change_by, list):
        new_colour = [colour[i] + change_by[i] for i in range(len(colour))]
    else:
        return colour
    for i in range(len(colour)):
        new_colour[i] = 0 if new_colour[i] < 0 else 255 if new_colour[i] > 255 else new_colour[i]
    return tuple(new_colour)