 
     @inPorts.css.on 'data', (boo) =>
       @outputCssColors = boo
+    @inPorts.colors.on 'data', (data) =>
+      @colors = data
+    @inPorts.quality.on 'data', (data) =>
+      @quality = data
 
 exports.getComponent = -> new GetColors

  constructor: ->

    @outputCssColors = false

    @inPorts =
      canvas: new noflo.Port 'object'
      css: new noflo.Port 'boolean'
    @outPorts =
      colors: new noflo.Port 'array'
      canvas: new noflo.Port 'object'

      pixels = context.getImageData(0, 0, canvas.width, canvas.height).data
      pixelCount = canvas.width*canvas.height
      try
        colors = thief.getPaletteFromPixels pixels, pixelCount, @colors, @quality
        if @outputCssColors
          colors = colors.map (color) -> "rgb(#{color[0]}, #{color[1]}, #{color[2]})"
      catch e
