Permalink
Browse files

Merge pull request #70 from glindholm/patch-1

Update jquery.ui.colorpicker-cmyk-percentage-parser.js
  • Loading branch information...
2 parents a6c169f + d63d1ca commit 54b4e7d33254a043aef94b031343d719373a9037 @vanderlee committed Dec 26, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js
View
12 parsers/jquery.ui.colorpicker-cmyk-percentage-parser.js
@@ -1,13 +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+(?:\.\d+)?)\%\s*\)$/.exec(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] / 255,
- m[2] / 255,
- m[3] / 255,
- m[4] / 255
+ m[1] / 100,
+ m[2] / 100,
+ m[3] / 100,
+ m[4] / 100
);
}
};
-});
+});

0 comments on commit 54b4e7d

Please sign in to comment.