Permalink
Browse files

Improve Color equality tolerance

  • Loading branch information...
jonastreub committed Jun 12, 2017
1 parent e65f583 commit 34d048eb214d6d5a3863b2ada0f46977c9652947
Showing with 2 additions and 3 deletions.
  1. +2 −3 framer/Color.coffee
View
@@ -303,12 +303,11 @@ class exports.Color extends BaseClass
colorA = new Color(colorA)
colorB = new Color(colorB)
tolerance = 1
alphaTolerance = 0.01
tolerance = 0.01
return false if Math.abs(colorA.r - colorB.r) >= tolerance
return false if Math.abs(colorA.g - colorB.g) >= tolerance
return false if Math.abs(colorA.b - colorB.b) >= tolerance
return false if Math.abs(colorA.a - colorB.a) >= alphaTolerance
return false if Math.abs(colorA.a - colorB.a) >= tolerance
return true
@rgbToHsl: (a, b, c) ->

0 comments on commit 34d048e

Please sign in to comment.