if you want to make the cyan go from 6% to 0%, change this line
col.cyan = Math.round(col.cyan);
col.cyan = Math.round(col.cyan/100)*100;
the rest of the script will still get rid of the decimals.
this is a pain. I need to run one script to change multiple colours in a document say i have a yellow square and its in RGB when i convert it then i need to remove 6% cyan, then if i want a nice pink its fine in RGB but then i convert it and theres like 35% cyan which i need to remove, is there no way i can make a script that i can define the colour and tell it to change from
C=6 M=0 Y=100 K=0 to c=0 m=0 y=100 = k=0
then for each other colour I have a web app which works in RGB i have about 24 colours i would need to define in the script but i need to know how to create it.
you're not going to magically find a script suited for your particular needs...if you want to know how to create a script, there are plenty of examples to learn from in this forum, make some searches, look at the documentation and you can always come back, post your code and we'll help you put it together.
Ok i realise theres not a quick solution. I will do a bit more research on this, just hoped someone out there might have the answer already
no problem, sometimes someone else had the exact same need and the issue is common enough to suit many users...most times, no. Your issue might be particular to your own workflow, so it needs a script tailored to your needs.
as bigjobfaceman said in the other thread, the script has no way of knowing what a "nice pink" is, it has to work with know values, being decimals or 6%, or other know value.
it seems doable, but you're not being clear enough for a machine to understand, if you're able to find a way to translate "nice pink" to numbers, then there's a good chance a script can be made.
I've got a bit further with applescript as i've used it a little but i've got an error this is my code so far:
tell application "Adobe Illustrator"
if exists color is equal to "C=0 M=0 Y=0 K=90" then
set color to "C=0 M=0 Y=0 K=100"
The error i'm getting is "can't get color"
the color is there however i believe i must not be using the correct variable any clues?
Hi Justin, sorry I don't do applescript...but other contributors do, Mark or Larry should be able help you..
You might check the AppleScript Sample Scripts folder for the scripts on Swatches, esp the one SwatchGroupFromArt for some clues on handling color and swatches.