def get_color_value(color, lower_limit=0.0, upper_limit=1.0):
    """
    Get a value for the color.

    Arguments:
        color {string} -- The name of the color value to get.
        lower_limit {float} -- The lower bound of the legal color value.
        upper_limit {float} -- The upper bound of the legal color value.

    Returns:
        float -- The color value.
    """
    # while True:
    #     value = float(input(f"Please enter the {color} value: "))
    #     if value >= 0 and value <= 1:
    #         break
    #     print(f"{value} is not valid, please enter a value betwen 0 and 1.")

    while True:
        try:
            value = float(input(f"Please enter the {color} value: "))
            if not (value >= lower_limit and value <= upper_limit):
                raise ValueError
            break
        except ValueError:
            print(
                f"Invalid input, please enter a number betwen {lower_limit} and {upper_limit}."
            )

    return value