function setColor(ctx, hsv, rgb, hex) {
        ctx.h = hsv.h % 360;
        ctx.s = hsv.s;
        ctx.v = hsv.v;

        var c = hsv2rgb(ctx);

        var mouseSlide = {
            y: (ctx.h * ctx.slideElement.offsetHeight) / 360,
            x: 0 // not important
        };

        var pickerHeight = ctx.pickerElement.offsetHeight;

        var mousePicker = {
            x: ctx.s * ctx.pickerElement.offsetWidth,
            y: pickerHeight - ctx.v * pickerHeight
        };

        ctx.pickerElement.style.backgroundColor = hsv2rgb({
            h: ctx.h,
            s: 1,
            v: 1
        }).hex;
        ctx.callback && ctx.callback(hex || c.hex, {
            h: ctx.h,
            s: ctx.s,
            v: ctx.v
        }, rgb || {
            r: c.r,
            g: c.g,
            b: c.b
        }, mousePicker, mouseSlide);

        return ctx;
    }
Sets color of the picker in hsv/rgb/hex format.
@param {object} ctx ColorPicker instance.
@param {object} hsv Object of the form: { h: <hue>, s: <saturation>, v: <value> }.
@param {object} rgb Object of the form: { r: <red>, g: <green>, b: <blue> }.
@param {string} hex String of the form: #RRGGBB.