cleanup and update of jquery-colorpicker dependency
This commit is contained in:
13
js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-parser.js
vendored
Normal file
13
js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-parser.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
jQuery(function($) {
|
||||
$.colorpicker.parsers['CMYK'] = function (color) {
|
||||
var m = /^cmyk\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/.exec(color);
|
||||
if (m) {
|
||||
return (new $.colorpicker.Color()).setCMYK(
|
||||
m[1] / 255,
|
||||
m[2] / 255,
|
||||
m[3] / 255,
|
||||
m[4] / 255
|
||||
);
|
||||
}
|
||||
};
|
||||
});
|
13
js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js
vendored
Normal file
13
js/jquery-colorpicker/parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
jQuery(function($) {
|
||||
$.colorpicker.parsers['CMYK%'] = function (color) {
|
||||
var m = /^cmyk\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*\)$/.exec(color);
|
||||
if (m) {
|
||||
return (new $.colorpicker.Color()).setCMYK(
|
||||
m[1] / 100,
|
||||
m[2] / 100,
|
||||
m[3] / 100,
|
||||
m[4] / 100
|
||||
);
|
||||
}
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user