def offset_hue_color(hsv, offset):
    """
    Offsets the hue value in -360-360 range by the given offset amount and keeps range by looping
    :param hsv: list(float, float, float), list or tuple representing the hue saturation and value color
    :param offset: float, offset value to offset the saturation
    :return: list(float, float, float), offset hue saturation value color
    """

    if offset > 360:
        offset = 360
    elif offset < -360:
        offset = -360
    hsv[0] += offset
    if hsv[0] > 360:
        hsv[0] -= 360
    elif hsv[0] < 0:
        hsv[0] += 360

    return hsv