diff --git a/bootstrap-colorpickersliders.jquery.json b/bootstrap-colorpickersliders.jquery.json
index c947d21..f9189e3 100644
--- a/bootstrap-colorpickersliders.jquery.json
+++ b/bootstrap-colorpickersliders.jquery.json
@@ -12,7 +12,7 @@
"widget",
"colorchooser"
],
- "version": "3.0.0",
+ "version": "3.0.1",
"author": {
"name": "István Ujj-Mészáros",
"url": "https://github.com/istvan-ujjmeszaros"
diff --git a/bower.json b/bower.json
index 101025d..dc6c818 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "bootstrap-colorpickersliders",
- "version": "3.0.0",
+ "version": "3.0.1",
"homepage": "http://www.virtuosoft.eu/code/bootstrap-colorpickersliders/",
"authors": [
{
diff --git a/composer.json b/composer.json
index 07d66a0..9659e1d 100644
--- a/composer.json
+++ b/composer.json
@@ -13,7 +13,7 @@
],
"description": "Bootstrap 3 optimized responsive color selector with HSV, HSL, RGB and CIE-Lch (which supports human perceived lightness) selectors and color swatches.",
"homepage": "http://www.virtuosoft.eu/code/bootstrap-colorpickersliders/",
- "version": "3.0.0",
+ "version": "3.0.1",
"authors": [
{
"name": "István Ujj-Mészáros",
diff --git a/dist/bootstrap.colorpickersliders.css b/dist/bootstrap.colorpickersliders.css
index f1d0069..fded98c 100644
--- a/dist/bootstrap.colorpickersliders.css
+++ b/dist/bootstrap.colorpickersliders.css
@@ -1,5 +1,5 @@
/*
- * Bootstrap Color Picker Sliders - v3.0.0
+ * Bootstrap Color Picker Sliders - v3.0.1
*
* Bootstrap 3 optimized responsive color selector with HSV, HSL, RGB and CIE-Lch (which supports human perceived lightness) selectors and color swatches.
* http://www.virtuosoft.eu/code/bootstrap-colorpickersliders/
diff --git a/dist/bootstrap.colorpickersliders.js b/dist/bootstrap.colorpickersliders.js
index e6e3132..6d3603b 100644
--- a/dist/bootstrap.colorpickersliders.js
+++ b/dist/bootstrap.colorpickersliders.js
@@ -1,5 +1,5 @@
/*
- * Bootstrap Color Picker Sliders - v3.0.0
+ * Bootstrap Color Picker Sliders - v3.0.1
*
* Bootstrap 3 optimized responsive color selector with HSV, HSL, RGB and CIE-Lch (which supports human perceived lightness) selectors and color swatches.
* http://www.virtuosoft.eu/code/bootstrap-colorpickersliders/
@@ -1350,7 +1350,12 @@
switch (format) {
case 'hex':
- $element.val(color.tiny.toHexString());
+ if (color.hsla.a < 1) {
+ $element.val(color.tiny.toRgbString());
+ }
+ else {
+ $element.val(color.tiny.toHexString());
+ }
break;
case 'hsl':
$element.val(color.tiny.toHslString());
@@ -1493,7 +1498,12 @@
switch (settings.previewformat) {
case 'hex':
- colorstring = color.tiny.toHexString();
+ if (color.hsla.a < 1) {
+ colorstring = color.tiny.toRgbString();
+ }
+ else {
+ colorstring = color.tiny.toHexString();
+ }
break;
case 'hsl':
colorstring = color.tiny.toHslString();
diff --git a/dist/bootstrap.colorpickersliders.min.css b/dist/bootstrap.colorpickersliders.min.css
index 58ecee8..72ad824 100644
--- a/dist/bootstrap.colorpickersliders.min.css
+++ b/dist/bootstrap.colorpickersliders.min.css
@@ -1,5 +1,5 @@
/*
- * Bootstrap Color Picker Sliders - v3.0.0
+ * Bootstrap Color Picker Sliders - v3.0.1
*
* Bootstrap 3 optimized responsive color selector with HSV, HSL, RGB and CIE-Lch (which supports human perceived lightness) selectors and color swatches.
* http://www.virtuosoft.eu/code/bootstrap-colorpickersliders/
diff --git a/dist/bootstrap.colorpickersliders.min.js b/dist/bootstrap.colorpickersliders.min.js
index 76f8156..c435ff3 100644
--- a/dist/bootstrap.colorpickersliders.min.js
+++ b/dist/bootstrap.colorpickersliders.min.js
@@ -1,5 +1,5 @@
/*
- * Bootstrap Color Picker Sliders - v3.0.0
+ * Bootstrap Color Picker Sliders - v3.0.1
*
* Bootstrap 3 optimized responsive color selector with HSV, HSL, RGB and CIE-Lch (which supports human perceived lightness) selectors and color swatches.
* http://www.virtuosoft.eu/code/bootstrap-colorpickersliders/
@@ -12,4 +12,4 @@
*
* Using color math algorithms from EasyRGB Web site:/
* http://www.easyrgb.com/index.php?X=MATH */
-!function(a){"use strict";a.fn.ColorPickerSliders=function(b){return this.each(function(){function c(){"undefined"==typeof b&&(b={}),fb=a.extend({color:"hsl(342, 52%, 70%)",size:"default",placement:"auto",trigger:"focus",preventtouchkeyboardonshow:!0,title:"",hsvpanel:!1,sliders:!0,grouping:!0,swatches:["FFFFFF","C0C0C0","808080","000000","FF0000","800000","FFFF00","808000","00FF00","008000","00FFFF","008080","0000FF","000080","FF00FF","800080"],customswatches:"colorpickkersliders",connectedinput:!1,flat:!1,updateinterval:30,previewontriggerelement:!0,previewcontrasttreshold:15,previewformat:"rgb",erroneousciecolormarkers:!0,invalidcolorsopacity:1,finercierangeedges:!0,titleswatchesadd:"Add color to swatches",titleswatchesremove:"Remove color from swatches",titleswatchesreset:"Reset to default swatches",order:{},labels:{},onchange:function(){}},b),fb.order=b.hasOwnProperty("order")?a.extend({opacity:!1,hsl:!1,rgb:!1,cie:!1,preview:!1},b.order):{opacity:0,hsl:1,rgb:2,cie:3,preview:4},b.hasOwnProperty("labels")||(b.labels={}),fb.labels=a.extend({hslhue:"HSL-Hue",hslsaturation:"HSL-Saturation",hsllightness:"HSL-Lightness",rgbred:"RGB-Red",rgbgreen:"RGB-Green",rgbblue:"RGB-Blue",cielightness:"CIE-Lightness",ciechroma:"CIE-Chroma",ciehue:"CIE-hue",opacity:"Opacity",preview:"Preview"},b.labels)}function d(){kb||(kb=!0,pb=a.fn.ColorPickerSliders.detectWhichGradientIsSupported(),"filter"===pb&&(pb=!1),!pb&&a.fn.ColorPickerSliders.svgSupported()&&(pb="svg"),c(),fb.order.hasOwnProperty("preview")&&fb.order.preview!==!1||pb||(fb.order.preview=10),p(),f(),g(),P(),Q(),fb.flat&&o(),q())}function e(){n(),E(),O(),r()}function f(){mb?(yb.tiny=tinycolor(lb.val()),yb.tiny.isValid()||(yb.tiny=tinycolor(fb.color))):yb.tiny=tinycolor(fb.color),yb.hsla=yb.tiny.toHsl(),yb.rgba=yb.tiny.toRgb(),yb.hsv=yb.tiny.toHsv(),yb.cielch=a.fn.ColorPickerSliders.rgb2lch(yb.rgba)}function g(){fb.connectedinput&&(nb=fb.connectedinput instanceof jQuery?fb.connectedinput:a(fb.connectedinput))}function h(b,c){var d=tinycolor(b);return d.isValid()?(yb.tiny=d,yb.hsla=d.toHsl(),yb.rgba=d.toRgb(),yb.hsv=d.toHsv(),yb.cielch=a.fn.ColorPickerSliders.rgb2lch(yb.rgba),fb.flat||qb?(gb.removeClass("cp-unconvertible-cie-color"),O(c)):(c||Q(),P()),!0):!1}function i(a){if(!fb.flat){if(qb)return lb.popover("hide"),lb.popover("show"),void r();k(a),qb=!0}}function j(){qb=!1,l()}function k(b){if(!(hb instanceof jQuery)){switch("undefined"==typeof b&&(b=!1),hb=a('
').appendTo("body"),gb=a('').appendTo(hb),gb.html(m()),fb.size){case"sm":gb.addClass("cp-container-sm");break;case"lg":gb.addClass("cp-container-lg")}e(),b||x(),lb.popover({html:!0,animation:!1,trigger:"manual",title:fb.title,placement:fb.placement,container:hb,content:function(){return gb}}),lb.popover("show")}}function l(){hb.remove(),hb=null,lb.popover("destroy")}function m(){var a=[],b="";if(fb.sliders&&(fb.order.opacity!==!1&&(a[fb.order.opacity]=''),fb.order.hsl!==!1&&(a[fb.order.hsl]=''+fb.labels.hslsaturation+' '+fb.labels.hsllightness+' '),fb.order.rgb!==!1&&(a[fb.order.rgb]=''),fb.order.cie!==!1&&(a[fb.order.cie]=''+fb.labels.cielightness+' '),fb.order.preview!==!1&&(a[fb.order.preview]='')),fb.grouping&&(b+=!!fb.hsvpanel+!!(fb.sliders&&a.length>0)+!!fb.swatches>1?'':'"),fb.hsvpanel&&(b+=''),fb.sliders){b+='';for(var c=0;c
"}return fb.swatches&&(b+=''),b}function n(){ib={actualswatch:!1,swatchescontainer:a(".cp-swatches",gb),swatches:a(".cp-swatches ul",gb),swatches_add:a(".cp-swatches button.add",gb),swatches_remove:a(".cp-swatches button.remove",gb),swatches_reset:a(".cp-swatches button.reset",gb),all_sliders:a(".cp-sliders, .cp-preview input",gb),hsvpanel:{sv:a(".cp-hsvpanel-sv",gb),sv_marker:a(".cp-hsvpanel-sv .cp-marker-point",gb),h:a(".cp-hsvpanel-h",gb),h_marker:a(".cp-hsvpanel-h .cp-hsvmarker-vertical",gb),a:a(".cp-hsvpanel-a span",gb),a_marker:a(".cp-hsvpanel-a .cp-hsvmarker-vertical",gb)},sliders:{hue:a(".cp-hslhue span",gb),hue_marker:a(".cp-hslhue .cp-marker",gb),saturation:a(".cp-hslsaturation span",gb),saturation_marker:a(".cp-hslsaturation .cp-marker",gb),lightness:a(".cp-hsllightness span",gb),lightness_marker:a(".cp-hsllightness .cp-marker",gb),opacity:a(".cp-opacity span",gb),opacity_marker:a(".cp-opacity .cp-marker",gb),red:a(".cp-rgbred span",gb),red_marker:a(".cp-rgbred .cp-marker",gb),green:a(".cp-rgbgreen span",gb),green_marker:a(".cp-rgbgreen .cp-marker",gb),blue:a(".cp-rgbblue span",gb),blue_marker:a(".cp-rgbblue .cp-marker",gb),cielightness:a(".cp-cielightness span",gb),cielightness_marker:a(".cp-cielightness .cp-marker",gb),ciechroma:a(".cp-ciechroma span",gb),ciechroma_marker:a(".cp-ciechroma .cp-marker",gb),ciehue:a(".cp-ciehue span",gb),ciehue_marker:a(".cp-ciehue .cp-marker",gb),preview:a(".cp-preview input",gb)},all_pills:a(".cp-pills",gb),pills:{hsvpanel:a(".cp-pill-hsvpanel",gb),sliders:a(".cp-pill-sliders",gb),swatches:a(".cp-pill-swatches",gb)}},fb.customswatches||(ib.swatches_add.hide(),ib.swatches_remove.hide(),ib.swatches_reset.hide())}function o(){fb.flat&&(mb?gb=a('').insertAfter(lb):(gb=a(''),lb.append(gb)),gb.append(m()),e(),x())}function p(){fb.connectedinput instanceof jQuery?fb.connectedinput.add(lb):fb.connectedinput=fb.connectedinput===!1?lb:a(fb.connectedinput).add(lb)}function q(){lb.on("colorpickersliders.updateColor",function(a,b){h(b)}),lb.on("colorpickersliders.show",function(){i()}),lb.on("colorpickersliders.hide",function(){j()}),fb.flat||"focus"!==fb.trigger||("undefined"==typeof lb.attr("tabindex")&&lb.attr("tabindex",-1),fb.preventtouchkeyboardonshow&&(a(lb).prop("readonly",!0).addClass("cp-preventtouchkeyboardonshow"),a(lb).on("click",function(b){qb&&(a(lb).prop("readonly",!1),b.stopPropagation())})),mb||a(lb).on("click",function(a){i(),a.stopPropagation()}),a(lb).on("focus",function(a){i(),a.stopPropagation()}),a(lb).on("blur",function(b){j(),fb.preventtouchkeyboardonshow&&a(lb).prop("readonly",!0),b.stopPropagation()})),nb&&nb.on("keyup change",function(){var b=a(this);h(b.val(),!0)})}function r(){gb.on("contextmenu",function(a){return a.preventDefault(),!1}),a(document).on("colorpickersliders.changeswatches",function(){E()}),ib.swatches.on("touchstart mousedown click","li span",function(b){var c=a(this).css("background-color");h(c),b.preventDefault()}),ib.swatches_add.on("touchstart mousedown click",function(a){H(),a.preventDefault(),a.stopPropagation()}),ib.swatches_remove.on("touchstart mousedown click",function(a){I(),a.preventDefault(),a.stopPropagation()}),ib.swatches_reset.on("touchstart touchend mousedown click",function(a){("click"===a.type||"touchend"===a.type)&&J(),a.preventDefault(),a.stopImmediatePropagation()}),ib.sliders.hue.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="hue";var b=L(sb,a);K("hsla","h",3.6*b),O()}}),ib.sliders.saturation.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="saturation";var b=L(sb,a);K("hsla","s",b/100),O()}}),ib.sliders.lightness.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="lightness";var b=L(sb,a);K("hsla","l",b/100),O()}}),ib.sliders.opacity.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="opacity";var b=L(sb,a);K("hsla","a",b/100),O()}}),ib.sliders.red.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="red";var b=L(sb,a);K("rgba","r",2.55*b),O()}}),ib.sliders.green.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="green";var b=L(sb,a);K("rgba","g",2.55*b),O()}}),ib.sliders.blue.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="blue";var b=L(sb,a);K("rgba","b",2.55*b),O()}}),ib.hsvpanel.sv.on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="hsvsv";var b=M("sv",a);K("hsv","s",b.horizontal/100),K("hsv","v",(100-b.vertical)/100),O()}}),ib.hsvpanel.h.on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="hsvh";var b=M("h",a);K("hsv","h",3.6*b.vertical),O()}}),ib.hsvpanel.a.on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="hsva";var b=M("a",a);K("hsv","a",(100-b.vertical)/100),O()}}),ib.sliders.cielightness.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="cielightness";var b=L(sb,a);K("cielch","l",rb/100*b),O()}}),ib.sliders.ciechroma.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="ciechroma";var b=L(sb,a);K("cielch","c",zb/100*b),O()}}),ib.sliders.ciehue.parent().on("touchstart mousedown",function(a){if(a.preventDefault(),!(a.which>1)){sb="ciehue";var b=L(sb,a);K("cielch","h",3.6*b),O()}}),ib.sliders.preview.on("click",function(){this.select()}),a(document).on("touchmove mousemove",function(a){sb&&((new Date).getTime()-xb>vb&&!wb?C(sb,a):B(sb,a))}),a(document).on("touchend mouseup",function(a){a.which>1||sb&&(sb=!1,a.preventDefault())}),ib.pills.hsvpanel.on("click",function(a){a.preventDefault(),y()}),ib.pills.sliders.on("click",function(a){a.preventDefault(),z()}),ib.pills.swatches.on("click",function(a){a.preventDefault(),A()}),fb.flat||hb.on("touchstart mousedown",".popover",function(a){return a.preventDefault(),a.stopPropagation(),!1})}function s(a,b){try{localStorage.setItem("cp-userdata-"+a,JSON.stringify(b))}catch(c){}}function t(a){try{var b=JSON.parse(localStorage.getItem("cp-userdata-"+a));return b}catch(c){return null}}function u(){return""!==ob?ob:(0===ib.pills.hsvpanel.length&&(ob+="_hsvpanel_"),0===ib.pills.sliders.length&&(ob+="_sliders_"),0===ib.pills.swatches.length&&(ob+="_swatches_"),ob)}function v(){return t("config_activepill"+u())}function w(a){return s("config_activepill"+u(),a)}function x(){switch(v()){case"hsvpanel":y();break;case"sliders":z();break;case"swatches":A();break;default:if(ib.pills.hsvpanel.length){y();break}if(ib.pills.sliders.length){z();break}if(ib.pills.swatches.length){A();break}}}function y(){return 0===ib.pills.hsvpanel.length?!1:(a("a",ib.all_pills).removeClass("active"),ib.pills.hsvpanel.addClass("active"),gb.removeClass("sliders-active swatches-active").addClass("hsvpanel-active"),w("hsvpanel"),O(!0),i(!0),!0)}function z(){return 0===ib.pills.sliders.length?!1:(a("a",ib.all_pills).removeClass("active"),ib.pills.sliders.addClass("active"),gb.removeClass("hsvpanel-active swatches-active").addClass("sliders-active"),w("sliders"),O(!0),i(!0),!0)}function A(){return 0===ib.pills.swatches.length?!1:(a("a",ib.all_pills).removeClass("active"),ib.pills.swatches.addClass("active"),gb.removeClass("hsvpanel-active sliders-active").addClass("swatches-active"),w("swatches"),O(!0),i(!0),!0)}function B(a,b){clearTimeout(ub),ub=setTimeout(function(){C(a,b)},vb)}function C(a,b){var c;if(wb)return void B(a,b);switch(wb=!0,xb=(new Date).getTime(),c="hsvsv"===a?M("sv",b):"hsvh"===a?M("h",b):"hsva"===a?M("a",b):L(a,b),a){case"hsvsv":K("hsv","s",c.horizontal/100),K("hsv","v",(100-c.vertical)/100);break;case"hsvh":K("hsv","h",3.6*c.vertical);break;case"hsva":K("hsv","a",(100-c.vertical)/100);break;case"hue":K("hsla","h",3.6*c);break;case"saturation":K("hsla","s",c/100);break;case"lightness":K("hsla","l",c/100);break;case"opacity":K("hsla","a",c/100);break;case"red":K("rgba","r",2.55*c);break;case"green":K("rgba","g",2.55*c);break;case"blue":K("rgba","b",2.55*c);break;case"cielightness":K("cielch","l",rb/100*c);break;case"ciechroma":K("cielch","c",zb/100*c);break;case"ciehue":K("cielch","h",3.6*c)}O(),b.preventDefault(),wb=!1}function D(){jb=[];for(var a=0;a").css("background-color",e.toRgbString()),g=a('');g.append(f),ib.swatches.append(a("").append(g))}}}F()}}function F(){var b=!1;a("span",ib.swatches).filter(function(){var c=a(this).css("background-color");if(c=tinycolor(c),c.alpha=Math.round(100*c.alpha)/100,c.toRgbString()===yb.tiny.toRgbString()){b=!0;var d=a(this).parent();d.is(ib.actualswatch)||(ib.actualswatch&&ib.actualswatch.removeClass("actual"),ib.actualswatch=d,d.addClass("actual"))}}),b||ib.actualswatch&&(ib.actualswatch.removeClass("actual"),ib.actualswatch=!1),ib.actualswatch?(ib.swatches_add.prop("disabled",!0),ib.swatches_remove.prop("disabled",!1)):(ib.swatches_add.prop("disabled",!1),ib.swatches_remove.prop("disabled",!0))}function G(){localStorage.setItem("swatches-"+fb.customswatches,JSON.stringify(jb))}function H(){jb.unshift(yb.tiny.toRgbString()),G(),a(document).trigger("colorpickersliders.changeswatches")}function I(){var b=jb.indexOf(yb.tiny.toRgbString());-1!==b&&(jb.splice(b,1),G(),a(document).trigger("colorpickersliders.changeswatches"))}function J(){confirm("Do you really want to reset the swatches? All customizations will be lost!")&&(D(),G(),a(document).trigger("colorpickersliders.changeswatches"))}function K(b,c,d){switch(b){case"hsv":yb.hsv[c]=d,yb.tiny=tinycolor({h:yb.hsv.h,s:yb.hsv.s,v:yb.hsv.v,a:yb.hsv.a}),yb.rgba=yb.tiny.toRgb(),yb.hsla=yb.tiny.toHsl(),yb.cielch=a.fn.ColorPickerSliders.rgb2lch(yb.rgba);break;case"hsla":yb.hsla[c]=d,yb.tiny=tinycolor({h:yb.hsla.h,s:yb.hsla.s,l:yb.hsla.l,a:yb.hsla.a}),yb.rgba=yb.tiny.toRgb(),yb.hsv=yb.tiny.toHsv(),yb.cielch=a.fn.ColorPickerSliders.rgb2lch(yb.rgba),gb.removeClass("cp-unconvertible-cie-color");break;case"rgba":yb.rgba[c]=d,yb.tiny=tinycolor({r:yb.rgba.r,g:yb.rgba.g,b:yb.rgba.b,a:yb.hsla.a}),yb.hsla=yb.tiny.toHsl(),yb.hsv=yb.tiny.toHsv(),yb.cielch=a.fn.ColorPickerSliders.rgb2lch(yb.rgba),gb.removeClass("cp-unconvertible-cie-color");break;case"cielch":yb.cielch[c]=d,yb.rgba=a.fn.ColorPickerSliders.lch2rgb(yb.cielch),yb.tiny=tinycolor(yb.rgba),yb.hsla=yb.tiny.toHsl(),yb.hsv=yb.tiny.toHsv(),fb.erroneousciecolormarkers&&(yb.rgba.isok?gb.removeClass("cp-unconvertible-cie-color"):gb.addClass("cp-unconvertible-cie-color"))}}function L(b,c){var d=a.fn.ColorPickerSliders.calculateEventPositionPercentage(c,ib.sliders[b]);return ib.sliders[b+"_marker"].data("position",d),d}function M(b,c){var d=a.fn.ColorPickerSliders.calculateEventPositionPercentage(c,ib.hsvpanel.sv,!0);return ib.hsvpanel[b+"_marker"].data("position",d),d}function N(a){Ab=setTimeout(function(){O(a)},fb.updateinterval)}function O(a){return clearTimeout(Ab),Date.now=Date.now||function(){return+new Date},Date.now()-tb0&&d.push(g[h-1]);break}return a.merge(d,b)}function ab(){var b=a.fn.ColorPickerSliders.getScaledGradientStops(yb.cielch,"l",0,100,10,fb.invalidcolorsopacity);b=_(b,"l"),eb(ib.sliders.cielightness,b),ib.sliders.cielightness_marker.css("left",yb.cielch.l/rb*100+"%")}function bb(){var b=a.fn.ColorPickerSliders.getScaledGradientStops(yb.cielch,"c",0,zb,5,fb.invalidcolorsopacity);b=_(b,"c"),eb(ib.sliders.ciechroma,b),ib.sliders.ciechroma_marker.css("left",yb.cielch.c/zb*100+"%")}function cb(){var b=a.fn.ColorPickerSliders.getScaledGradientStops(yb.cielch,"h",0,360,28,fb.invalidcolorsopacity);b=_(b,"h"),eb(ib.sliders.ciehue,b),ib.sliders.ciehue_marker.css("left",yb.cielch.h/360*100+"%")}function db(){ib.sliders.preview.css("background",a.fn.ColorPickerSliders.csscolor(yb.rgba));var b;switch(fb.previewformat){case"hex":b=yb.tiny.toHexString();break;case"hsl":b=yb.tiny.toHslString();break;case"rgb":default:b=yb.tiny.toRgbString()}ib.sliders.preview.val(b)}function eb(b,c,d){switch("undefined"==typeof d&&(d=!1),c.sort(function(a,b){return a.position-b.position}),pb){case"noprefix":a.fn.ColorPickerSliders.renderNoprefix(b,c,d);break;case"webkit":a.fn.ColorPickerSliders.renderWebkit(b,c,d);break;case"ms":a.fn.ColorPickerSliders.renderMs(b,c,d);break;case"svg":a.fn.ColorPickerSliders.renderSVG(b,c,d);break;case"oldwebkit":a.fn.ColorPickerSliders.renderOldwebkit(b,c,d)}}var fb,gb,hb,ib,jb,kb=!1,lb=a(this),mb=lb.is("input"),nb=!1,ob="",pb=!1,qb=!1,rb=101,sb=!1,tb=0,ub=null,vb=70,wb=!1,xb=0,yb={tiny:null,hsla:null,rgba:null,hsv:null,cielch:null},zb=144;d();var Ab})},a.fn.ColorPickerSliders.getEventCoordinates=function(a){return"undefined"!=typeof a.pageX?{pageX:a.originalEvent.pageX,pageY:a.originalEvent.pageY}:"undefined"!=typeof a.originalEvent.touches?{pageX:a.originalEvent.touches[0].pageX,pageY:a.originalEvent.touches[0].pageY}:void 0},a.fn.ColorPickerSliders.calculateEventPositionPercentage=function(b,c,d){"undefined"==typeof d&&(d=!1);var e=a.fn.ColorPickerSliders.getEventCoordinates(b),f=c.width(),g=e.pageX-c.offset().left,h=g/f*100;if(0>h&&(h=0),h>100&&(h=100),d){var i=c.height(),j=e.pageY-c.offset().top,k=j/i*100;return 0>k&&(k=0),k>100&&(k=100),{horizontal:h,vertical:k}}return h},a.fn.ColorPickerSliders.getScaledGradientStops=function(b,c,d,e,f,g,h,i){"undefined"==typeof g&&(g=1),"undefined"==typeof h&&(h=0),"undefined"==typeof i&&(i=100);for(var j=[],k=e-d,l=!0,m=0;f>m;++m){var n,o=m/(f-1),p=a.fn.ColorPickerSliders.modifyColor(b,c,o*k+d);if(1>g){var q=a.fn.ColorPickerSliders.lch2rgb(p,g);l=q.isok,n=a.fn.ColorPickerSliders.csscolor(q,g)}else n=a.fn.ColorPickerSliders.csscolor(p,g);j[m]={color:n,position:o*(i-h)+h,isok:l,rawcolor:p}}return j},a.fn.ColorPickerSliders.getGradientStopsCSSString=function(a){for(var b="",c="",d="",e=0;e'}return{noprefix:b,oldwebkit:c,svg:d}},a.fn.ColorPickerSliders.renderNoprefix=function(b,c,d){"undefined"==typeof d&&(d=!1);var e,f=a.fn.ColorPickerSliders.getGradientStopsCSSString(c).noprefix;e=d?"linear-gradient(to bottom":"linear-gradient(to right",e+=f+")",b.css("background-image",e)},a.fn.ColorPickerSliders.renderWebkit=function(b,c,d){"undefined"==typeof d&&(d=!1);var e,f=a.fn.ColorPickerSliders.getGradientStopsCSSString(c).noprefix;e=d?"-webkit-linear-gradient(top":"-webkit-linear-gradient(left",e+=f+")",b.css("background-image",e)},a.fn.ColorPickerSliders.renderOldwebkit=function(b,c,d){"undefined"==typeof d&&(d=!1);var e,f=a.fn.ColorPickerSliders.getGradientStopsCSSString(c).oldwebkit;e=d?"-webkit-gradient(linear, 0% 0%, 0 100%":"-webkit-gradient(linear, 0% 0%, 100% 0%",e+=f+")",b.css("background-image",e)},a.fn.ColorPickerSliders.renderMs=function(b,c,d){"undefined"==typeof d&&(d=!1);var e,f=a.fn.ColorPickerSliders.getGradientStopsCSSString(c).noprefix;e=d?"-ms-linear-gradient(to bottom":"-ms-linear-gradient(to right",e+=f+")",b.css("background-image",e)},a.fn.ColorPickerSliders.renderSVG=function(b,c,d){"undefined"==typeof d&&(d=!1);var e="",f=a.fn.ColorPickerSliders.getGradientStopsCSSString(c).svg;e=d?'