Copy link to clipboard
Copied
Hello Everyone,
I have to create the SPOT color swatch with the Lab values. Also drafted the script, but it showing some error while running and unable to figure out the problem with my Script.
Please help me to overcome this issue, and also attaching the script.
docRef = app.activeDocument;
var color12 = new LabColor();
color12.l = 17;
color12.a = 1;
color12.b = 3;
var spot = docRef.spots.add();
spot.name = "PANTONE Black C";
spot.colorType = ColorModel.SPOT;
spot.color = color12;
Copy link to clipboard
Copied
It's working fine for me. What error message are you getting?
Copy link to clipboard
Copied
Worked for me too.
Windows 10, AI 26.2.1
Questions:
Is this to create a single swatch or will you expand the script to add a number of them at once?
Are you using this swatch for actual spot-color printing or for CMYK conversion?