         return false if x >= Tetris.levelSize
         return false if y >= Tetris.viewport.y
       return true
-
-    draw: (c) ->
-      rgba = (o, alpha=1) ->
-        "rgba(#{o.r},#{o.g},#{o.b},#{alpha})"
+    
+    colorString: ->
+      alpha = if @owned then 1 else 0.4
+      if @color.r?
+        "rgba(#{@color.r},#{@color.g},#{@color.b},#{alpha})"
+      else
+        "hsla(#{@color.h},#{@color.s},#{@color.l},#{alpha})"
+    
+    draw: (c) ->
       drawBlock = (blockDef) =>
         x = (@x*Tetris.gridSize) + (blockDef[0]*Tetris.gridSize) + 1
         y = (@y*Tetris.gridSize) + (blockDef[1]*Tetris.gridSize) + 1
-        alpha = if @owned then 1 else 0.4
         vs = Tetris.viewportSpace(x,y)
         return unless vs.visible
-        c.fillStyle = rgba(@color, alpha)
+        c.fillStyle = @colorString()
         c.fillRect(vs.x, vs.y, Tetris.blockSize, Tetris.blockSize)
       definition = @shapeDefinition(this.rotation)
       drawBlock(definition[0])

      x: 0
      y: 0
    shapes: {}
    playerID: makeGuid()
    viewportSpace: (x,y) ->
      ret = {x: x-(@viewportOffset.x*@gridSize), y: y-(@viewportOffset.y*@gridSize)}

    draw: (c) ->
      vs = Tetris.viewportSpace(@x*Tetris.gridSize+1, @y*Tetris.gridSize+1)
      return unless vs.visible
      c.fillStyle = Tetris.abandonedBlockColor
      c.fillRect(vs.x, vs.y, Tetris.blockSize, Tetris.blockSize)


