export var calculateChange = function (e, hsl, container) {
    var containerWidth = container.clientWidth;
    var x = e.pageX;
    var left = x - (container.getBoundingClientRect().left + window.scrollX);
    var h;
    if (left < 0) {
        h = 0;
    }
    else if (left > containerWidth) {
        h = 360;
    }
    else {
        var percent = (left * 100) / containerWidth;
        h = (360 * percent) / 100;
    }
    return {
        h: Math.round(h),
        s: hsl.s,
        l: hsl.l
    };
};
