 
     @listenTo(@model.dataset, "change:layerColors change:layerColors.*" , (model, layerColors) ->
       for name, color of layerColors
-        color = _.map color, (e) -> e / 255
+        color = @convertColor(color)
         uniformName = @sanitizeName(name) + "_color"
         @uniforms[uniformName].value = new THREE.Vector3(color...)
       return

        value : 0


  createTextures : ->

    # create textures

      @textures[shaderName].binaryCategory = binary.category
      @textures[shaderName].binaryName = binary.name

    layerColors = @model.dataset.get("layerColors")
    for shaderName, texture of @textures
      @uniforms[shaderName + "_texture"] = {
        type : "t"
        value : texture
      }
      unless texture.binaryCategory == "segmentation"
        color = @convertColor(layerColors[texture.binaryName])
        @uniforms[shaderName + "_weight"] = {
          type : "f"
          value : 1
