Creating lab colour swatches in illustrator using csv text

I just tried with the latest version of CGS ORIS Color Tuner // Web using the APPE engine.

Now as the source was setup as Lab spots, this may not be a problem! So if you know that your RIP/DFE can correctly render from a Lab based spot to final device space, then you are all good to go. Otherwise you may have to convert the spots to final proofing device CMYK (not press simulation CMYK) first and run the chart with no colour management.

Thanks Stephen, by all accounts the LAB colours render correctly when output on both proof and press, I have measured my colours in with an I1 and all my delta E's are very close.
 
No problem William... There are other options still available.

Am I right in thinking you are printing 100 swatches at a time on an SRA3 Sheet?

​
 
HI Tim-ellis, I can go up to sra1 and I think my squares need to be 50x50mm minimum to get a reading off the i1. I did have some success in adjusting the square size within the script but the text remained a static size and overset the text box. Am still a complete novice in scripting, but am learning so much with the help and support I'm getting here.
 
Thanks Stephen, by all accounts the LAB colours render correctly when output on both proof and press, I have measured my colours in with an I1 and all my delta E's are very close.


That is great, I’m glad that you are not hitting any conversion issues or running afoul of RIP/DFE and PDF spot colour limitations.


P.S. Looking at i1Profiler, I believe that the minimum recommended swatch size for i1 handheld devices is 10mm wide / 9mm high (and a little less for the automated iO table). It of course also varies between i1Pro and i1Pro2.

It really helps to use the spot measurement attachment if the patches are small:


Click image for larger version  Name:	i1Pro-spot.jpg Views:	1 Size:	20.3 KB ID:	262328




Stephen Marsh
 

Attachments

  • i1Pro-spot.jpg
    i1Pro-spot.jpg
    20.3 KB · Views: 301
Last edited:
Tim-Ellis, I have had a look at this, Render Swatch Legend works fantastic, the resulting illustrator puts in the colour blocks accurately and on output to pdf shows me it keeps the colours as LAB. A small annoyance is that the text it adds over each block has the cmyk values and not the LAB values - and I am not sure how to change this. Have looked through the script and there are many references to cmyk and not sure which one to change to make the text appear as lab. Not sure if you have any suggestions on this, no worries if not, I can work around this as its just the naming convention - everything else works a treat. Thanks once again Tim-Ellis.

Hello William,

Man your patches are BIG!. I guess one of your team members will have the joy of taking all the readings one by one using the text for guidance.

I have gone for the path of least resistance.

I have amended the spread sheet so that the Swatch name is the last column (ignored by the Apple Script). The first column is now the Swatch Name plus LAB values. e.g.:
-​
SWATCH 4 L*59 a*-36 b*23​

Then I has edited Johns script so that
textRef.contents = swatches[c].name+ "\r" + getColorValues(swatches[c].color) ;


becomes
textRef.contents = swatches[c].name;


So you don't get anything but the swatch name.


I have no idea how to amend the font size at this point but you can record an Action to
-
Record...

File > Select > Object > All Text Objects.

Then just amend the font and point size to what works best for you.

Stop



New files attached for you.

Hope that sorts you out.
 

Attachments

  • LAB LIST.xlsx.zip
    57.2 KB · Views: 341
  • renderSwatchNameLegend.jsx.zip
    1.8 KB · Views: 355
Last edited:
@ Stephen / Tim-ellis, have not fully considered format / design / size of the squares, as there are 2 intended purposes - one is for measuring and validating, the other is for distributing to clients. In either instance, I never thought I'd get as far as I have with the help you have given me.. I can cut these down if needs be, I started off big so as to make decent visual comparison between proof and press. I have enough tools available now at my disposal (thanks to you both) to be able to manipulate the illustrator file to suit. Unbelievable progress has been made here. Thanks again
 
Last edited:
That is great, I’m glad that you are not hitting any conversion issues or running afoul of RIP/DFE and PDF spot colour limitations.


P.S. Looking at i1Profiler, I believe that the minimum recommended swatch size for i1 handheld devices is 10mm wide / 9mm high (and a little less for the automated iO table). It of course also varies between i1Pro and i1Pro2.

It really helps to use the spot measurement attachment if the patches are small:









Stephen Marsh

Hello Stephen,

The image is visible if I visit your profile page. Thanks for posting the image, I could never figure out what that thing was for.. :)
 
Last edited:
Hello William,

Ok. All done. I had a look at how to edit an .ASE file but it's WAY too complex for me.

Here is a ZIP file with the Spreadsheet Template for the values and the Apple Script to make it work.

I had to set an upper limit so it will create 200 swatches, let me know if you need more than that.

Unzip the file somewhere easy to find. Open the Script with Script Editor and press the RUN icon.


The Script will ...
  • Create a new blank AI document and then delete all the default swatches (to avoid duplicate names)
    -
  • It will ask you to select the Excel Spreadsheet with all the LAB values and Swatch Names you have decided upon (no duplicate names please)
    -
  • The script will ask you how many rows you want it to process. Just enter the number of rows you have created in the spreadsheet (my Excel scripting is not good enough to detect where you have stopped filling in rows)
    -
  • The script will then create the LAB swatches in the AI doc and tell you when its DONE. Just click OK to finish.
    -
  • Once done you save your Swatches as an ASE Library and share them between users and applications.



Please remember
  • AI does not hold LAB values with a decimal place. 72.14 will become just 72 in Illustrator.
    -
  • There is only a little error checking inside the script at this point so you might get an error or two the first time.


How does it work?


Yes - lots of scripts for RGB and CMYK swatches out there. I couldn't find anything referring to LAB so I took a lucky guess and it worked.



tell application "Adobe Illustrator"



set SpotColor to {l:50, a:25, b:25}

make new spot in document 1 with properties {name:"Swatch Name", color type:spot color, color:SpotColor}



end tell




What do I do if it doesn't work?

Just post the problem here. Good luck.

does this script happen to exist for PC somewhere?
 
Hello cdk95570,

Well ...NO and YES.

These AppleScripts are Mac only. They are written in what is like the Apple version of Microsoft Visual Basic.

But!

Adobe products often speak JavaScript too.

So you might want to look at "renderSwatchLegend" for Illustrator - attached.

This is by the wonderful John Wundes who has donated so much of this stuff to the internet for free. There is something for everyone here I promise you.


http://www.wundes.com/JS4AI/

https://github.com/johnwun/js4ai
  • Install by saving in "C:\Program Files\Adobe\Illustrator CS\Presets\Scripts" or equivalent folder. These scripts should run on both Windows and Mac platforms.
  • Once you copy the files to the folder, after quitting and restarting Illustrator, they will appear in File > Scripts.
  • If you are just trying them out and don't want to restart, there is also a keyboard shortcut (PC) Ctrl + F12 or (Mac) Command + F12. Just browse to the script of your choice.
  • You can open and read the script and instructions in each file with Notepad / Text Edit
Don't forget to look out for InDesign Scripts too as they can often be fantastic. Look out for .js and .jsx files

Just google "best free indesign scripts" and "best free illustrator scripts"


If you have some JavaScript skills you can tweak and customise these. There are plenty of online tutorials about JavaScript if you get stuck.

I am not a great JavaScript coder but if you cannot find anything here that works for you, just post again and we will see what we can do.

Best of luck!

Tim
 

Attachments

  • renderSwatchLegend.jsx.zip
    1.7 KB · Views: 363

PressWise

A 30-day Fix for Managed Chaos

As any print professional knows, printing can be managed chaos. Software that solves multiple problems and provides measurable and monetizable value has a direct impact on the bottom-line.

“We reduced order entry costs by about 40%.” Significant savings in a shop that turns about 500 jobs a month.


Learn how…….

   
Back
Top