Closed getriebesand closed 8 years ago
In parse(value) if value is a rgb string, function p2v returns a string, but number is required for absround() later in format functions.
change var p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : p; }; to var p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : parseInt(p); }; will fix this issue
var p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : p; };
var p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : parseInt(p); };
awesome, thanks, will commit the change when i have some time
fixed in https://github.com/moagrius/Color/pull/6
In parse(value) if value is a rgb string, function p2v returns a string, but number is required for absround() later in format functions.
change
var p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : p; };
tovar p2v = function(p){ return isPercent.test(p) ? absround(parseInt(p) * 2.55) : parseInt(p); };
will fix this issue