diff --git a/src/mixin/color.js b/src/mixin/color.js index 8d4ca73..c29242c 100644 --- a/src/mixin/color.js +++ b/src/mixin/color.js @@ -24,18 +24,20 @@ function _colorChange (data, oldHue) { hsv.h = hsl.h = data.h || (data.hsl && data.hsl.h) || oldHue || 0 } + /* --- comment this block to fix #109, may cause #25 again --- */ // when the hsv.v is less than 0.0164 (base on test) // because of possible loss of precision // the result of hue and saturation would be miscalculated - if (hsv.v < 0.0164) { - hsv.h = data.h || (data.hsv && data.hsv.h) || 0 - hsv.s = data.s || (data.hsv && data.hsv.s) || 0 - } + // if (hsv.v < 0.0164) { + // hsv.h = data.h || (data.hsv && data.hsv.h) || 0 + // hsv.s = data.s || (data.hsv && data.hsv.s) || 0 + // } - if (hsl.l < 0.01) { - hsl.h = data.h || (data.hsl && data.hsl.h) || 0 - hsl.s = data.s || (data.hsl && data.hsl.s) || 0 - } + // if (hsl.l < 0.01) { + // hsl.h = data.h || (data.hsl && data.hsl.h) || 0 + // hsl.s = data.s || (data.hsl && data.hsl.s) || 0 + // } + /* ------ */ return { hsl: hsl,