10 Replies Latest reply on Jan 14, 2013 4:39 AM by mmcTimmermans

    Adding Lab colors to swatch - not implemented

    mmcTimmermans

      Dear all

       

      I have some problem adding new color swatches with the following code;

       

      var color:LabColor = new LabColor();

      color.l = colorObj.L;

      color.a = colorObj.a;

      color.b = colorObj.b;

       

      var swatch:Swatch = app.activeDocument.swatches.add();

      swatch.name =  colorObj.name;

      swatch.color = color;

       

      var swatchgroup:SwatchGroup = app.activeDocument.swatchGroups.add();

      swatchgroup.addSwatch(swatch);

       

       

      The code crashes at "swatch.color = color" with "[ERROR] CSAWLib.CSLogger CSHostObject.hostSet() failed on color - [LabColor] with msg: Not implemented"

       

      So it seems the setter for LabColor is not implemented yet. Am I doing something wrong? Is there another way to add Lab based swatches to the document?

       

      (Using FB 4.6 & CS ExtensionBuilder 2.0)

       

       

      Thanks for reading, regards

      Alexander