 
 test "#equal", ->
   color1 = Color(255, 255, 255, 1)
-  Color = Color([255, 255, 255])
-
-  ok color1.equal(Color)
+  color2 = Color([255, 255, 255])
+
+  ok color1.equal(color2)
 
 test "#toString", ->
   noAlpha = Color(30, 40, 23)


test "#mixWith$", ->
  color1 = Color(50, 40, 60, 0.3)
  Color = Color(10, 5, 16, 0.2)

  color3 = Color(50, 40, 60, 0.3)

  color1.mixWith$(Color)

  equalEnough color1.r, 30
  equalEnough color1.g, (45 / 2).round()
  equalEnough color1.b, (76 / 2).round()
  equalEnough color1.a, 0.5 / 2

  color3.mixWith$(Color, 0.1)

  equalEnough color3.r, ((50 * 0.1) + (10 * 0.9)).round()
  equalEnough color3.g, ((40 * 0.1) + (5 * 0.9)).round()

  equalEnough color.a, 1.0

test "Color.mix", ->
  mixedColor = Color.mix(
    Color("red"),
    Color("sky blue")
  )

  equalEnough mixedColor.r, 173
  equalEnough mixedColor.g, 94
  equalEnough mixedColor.b, 127
  equalEnough mixedColor.a, 1

  weightedMixedColor = Color.mix(Color(0, 255, 0, 1), Color(255, 0, 255, 0.6), 0.1)

  equalEnough weightedMixedColor.r, ((0 * 0.1) + (255 * 0.9)).round()
  equalEnough weightedMixedColor.g, ((255 * 0.1) + (0 * 0.9)).round()
  equalEnough weightedMixedColor.b, ((0 * 0.1) + (255 * 0.9)).round()
  equalEnough weightedMixedColor.a, (1 * 0.1) + (0.6 * 0.9)  

test "accepts named colors", ->
  white = Color("white")
