Skip to main content
Known Participant
May 8, 2022
Question

Creating Lab SPOT color swatch

  • May 8, 2022
  • 2 replies
  • 324 views

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;

 

 

 

This topic has been closed for replies.

2 replies

Dave Creamer of IDEAS
Community Expert
Community Expert
May 8, 2022

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?

David Creamer: Community Expert (ACI and ACE 1995-2023)
femkeblanco
Legend
May 8, 2022

It's working fine for me.  What error message are you getting?