Dear all
I tried to add a LabColor with an Illustrator script.
function addLabColorToSwatch(L,a,b,swatchName){
var color = new LabColor();
color.l = L;
color.a = a;
color.b = b;
var swatchgroup = app.activeDocument.swatchGroups.add();
swatchgroup.name = "test swatchgroup from jsx script";
var swatch = app.activeDocument.swatches.add();
swatch.name = swatchName;
swatch.color = color;
swatchgroup.addSwatch(swatch);
return true;
}
addLabColorToSwatch(1,2,3,"test");
The script crashes on the Line 'swatch.color = color;' with "Error 1202: Not implemented"
This seems to a bug. I allready filed it. I'm asking if anybody has a workaround.
Thank you very much
best regards,
Alexander
PS: Original discussion: http://forums.adobe.com/message/4986457#4986457