Skip to content
Permalink
Browse files

Style improvements

  • Loading branch information
Koen Bok
Koen Bok committed Jan 12, 2016
1 parent 1ab06fa commit 7399c607be0dac14a313e9fc701043f104512d5a
Showing with 8 additions and 1 deletion.
  1. +8 −1 framer/Color.coffee
@@ -270,16 +270,23 @@ class exports.Color extends BaseClass
return false

@equal: (colorA, colorB) ->

if !@validColorValue(colorA)
if !Color.isColorString(colorA)
return false

if !@validColorValue(colorB)
if !Color.isColorString(colorB)
return false

colorA = new Color(colorA)
colorB = new Color(colorB)

return colorA.r == colorB.r && colorA.g == colorB.g && colorA.b == colorB.b && colorA.a == colorB.a
return false if colorA.r isnt colorB.r
return false if colorA.g isnt colorB.g
return false if colorA.b isnt colorB.b
return false if colorA.a isnt colorB.a
return true

@rgbToHsl: (a, b, c) ->
return rgbToHsl(a, b, c)

0 comments on commit 7399c60

Please sign in to comment.
You can’t perform that action at this time.