Convert from spot color to custom CMYK value in Applescript

I thought this would be very simple and it's not apparently. I am trying to convert a spot color into a custom CMYK value. Basically:
tell application "Adobe Illustrator"
          set theList to every path item of current document
          repeat with k from 1 to count of theList
                    if fill color of item k of theList = {name:"Dark Green"} then
                              set fill color of item k of theList to {cyan:0.0, magenta:100.0, yellow:0.0, black:0.0}
                    end if
          end repeat
end tell
But this script obviously doesn't work. From what I can tell, the fill color simply returns the tint of the item, not the name of it. I can't find anything that returns the name of a spot color so I can set the correct corresponding color. In the above example, I made the color obviously changed so I could visually see the result.
Any advice would be greatly appreciated! I'm a first time poster here.
Thanks!

tell application "Adobe Illustrator"
          tell current document
                    set theList to every path item
                    set sw to every swatch
                    repeat with i from 1 to count of sw
                              set swname to name of item i of sw
                              if swname = "Dark Green" then
                                        set swco to color of item i of sw
                                        repeat with k from (count of theList) to 1 by -1
                                                  set co to fill color of item k of theList
                                                  if swco = co then
                                                            set fill color of item k of theList to {cyan:0.0, magenta:100.0, yellow:0.0, black:0.0}
                                                  end if
                                        end repeat
                              end if
                    end repeat
          end tell
end tell

Similar Messages

  • Converting from indexed color to grayscale no longer works in CS4

    I have a number of files to convert from indexed colors to grayscale. Did some but clicked "don't show me again" box on the Discard Colors warning. Now I can't make the conversion. Everything looks fine, but when I close file, then reopen, it's reverted to indexed colors - restarting Photoshop or the computer doesn't help.
    I'd appreciate any help....Thanks, Grant

    Grant,
    All your contact information is posted to the web. These forums are crawled by bots harvesting info.
    I don't think you want additional junk mail, unsolicited phone call scams, and possible attempts to crack your website, do you?
    People here recommend not to post contact info. Perhaps a forum moderator can remove your personal info, but you might be able to edit your post yourself.
    GIF only uses indexed color mode, So if you want your files to NOT be in the Indexed Color mode you need to save them as another file format like .png or .jpg

  • Why can one spot colour convert into two different sets of CMYK values?

    Working within Illustrator CC, I have an EPS file of a logo which has a colour fill value of:
    Pantone 152 U
    CMYK: 0C 51M 100Y 1K
    When I copy and paste this into a new document I get a much duller colour (orange) with colour values of:
    Pantone 152 U
    CMYK: 2C 57M 83Y 2K
    I have enabled 'ask when opening' & 'ask when pasting' for Profile Mismatches in Edit->Color Settings->'Color Management Policies' - no warning shows up.
    I have also tried turning off, changing color management policies.
    I've opened the original eps file and assigned my working space profile (Coated FOGRA39) and then try copy and pasting without success.
    Help!

    In addition to John's useful comments:
    Using Pantone 512U (uncoated) isn't correct for Coated Fogra.
    Why can one spot color convert into two different CMYK sets if converted by the user?
    Assumed, the one spot color is uniquely defined by one Lab set:
    – the CMYK spaces are different
    – the CMYK spaces are the same but the Rendering Intents are different
    – the CMYK spaces are the same but the Black Point Compensations are different
       (on or off for Relative Colorimetric).
    Assumed, the spot colors are equal by name, but valid for different versions, both in Lab:
    – this obviousl at present the most common source of deviations.
    Assumed, the spot colors are defined by CMYK:
    – a chaotic situation which I wouldn't even like to dicuss.
    – CMYK to CMYK conversions should be avoided under all circumstances.
    The solutions:
    If the spot color will be printed always and everywhere by Pantone spot ink:
    – purchase an actual Pantone color fan und discuss with the printer the mixture for the selected ink.
    If the Pantone color is merely a design feature, but the doc will be printed by CMYK:
    – choose such a color and verify by soft proofing that the color is in-gamut for common CMYK spaces. 
    – read the Lab values and proceed as far as possible using Lab.
    – don't use ink names, don't use any reference to Pantone.
    – convert into to a specificic CMYK space in advance to the generation of the specific PDF.
    Best regards --Gernot Hoffmann

  • Converting to spot colors in InDesign

    Hi, Im trying to create a two color job in InDesign that will be black and red. The problem I have is that our imagesetter is not separating the colors.
    I was told that the red color needs to be a spot color in InDesign for the imagesetter to know to separate the colors. Otherwise, if the colors are not set as a spot color then it sends the file as CMYK separations or grayscale separations.
    The question I have is how can I change the images (and text) in my InDesign file to be set as a spot color? Thanks in advance.

    You can import a grayscale image and use your two spot colors to create a mixed ink color, or you can create a duotone in PS, or if is line-art a multicolor DCS file. If it is line-art you can also create two separate grayscale or bitmap (black & white) images of each element in PS line them up in ID and apply your spot color to each. Too bad you can not color each layer PSD grayscale file in ID.

  • PDDocColorConvertPage doesn't convert the Spot Color "All"

    Hello,
    I use the PDDocColorConvertPage() method to convert a page to DeviceGray (with the AC_Color gray 1.8).
    Unfortunately the spot color "All" is still a spot color after the conversion (but the alternate color space is DeviceGray). Is it a normal behavior? Is it specific to the spot color "All" because it's a special case?
    Thanks in advance for any information,
    Joe

    Correct.
    I believe there is a flag you can set on the ColorConvert API to get rid of that too, if you really want – but All is special.

  • Converting to spot color

    I am trying to have a card printed and the printer is asking that I make the image in "spot color". I have no idea how to go about doing this. I created the image in Illustrator and formated it in InDesign. Can anyone help me out??
    I am posting links to the files I created.
    The Card:
    THANKYOUCARD.indd - Google Drive
    The Envelope:
    RBenvelope.indd - Google Drive
    The Logo:
    royburnscampaignlogo2.ai - Google Drive

    I am trying to have a card printed and the printer is asking that I make the image in "spot color". I have no idea how to go about doing this. I created the image in Illustrator and formated it in InDesign. Can anyone help me out??
    I am posting links to the files I created.
    The Card:
    THANKYOUCARD.indd - Google Drive
    The Envelope:
    RBenvelope.indd - Google Drive
    The Logo:
    royburnscampaignlogo2.ai - Google Drive

  • CYAN color range (0 to 100 %) convert to spot color

    Hi
    We have around 1000 eps files with different cyan values for ex cyan at 40 % or 60%, we require the cyan value to be changed to Pantone 801 C.
    Any script would be great help for us.
    Regards,
    Vinoth

    tell application "Adobe Illustrator"
              tell current document
                        set theList to every path item
                        set sw to every swatch
                        repeat with i from 1 to count of sw
                                  set swname to name of item i of sw
                                  if swname = "Dark Green" then
                                            set swco to color of item i of sw
                                            repeat with k from (count of theList) to 1 by -1
                                                      set co to fill color of item k of theList
                                                      if swco = co then
                                                                set fill color of item k of theList to {cyan:0.0, magenta:100.0, yellow:0.0, black:0.0}
                                                      end if
                                            end repeat
                                  end if
                        end repeat
              end tell
    end tell

  • How could I set a spot color to particular percent value?

    Hi,
    In one of my samples PDFs I have this content part:
    /OC /MC0 BDC
    /CS0 cs 0.6 scn
    /GS0 gs
    0 0 283.46 283.46 re
    f
    EMC
    How could I achieve the same value of '0.6' for some ColorSpace component with Acrobat SDK 9.x?
    If I do usual Graphics state creation and then apply it to my object - I could only get this result:
    /OC /MC0 BDC
    /CS0 cs 0 scn
    /GS0 gs
    0 0 283.46 283.46 re
    f
    EMC
    How could I get those 60%, i.e 0.6? I don't see that in obvoius way in PDEColorSpec structure.

    Ok, I have an answer to my question. In short - you need to use PDEGraphicState filling logic as for DeviceCMYK, but with some caviats.
    Hope one day Adobe will put that into his own Acrobat SDK docs/samples. Till then I'll charge 1/2 of their Developer Support case if anyone will need an answer from me.

  • Converting from pantone to cmyk color mode in Indesign CS3??

    I am working on a business card for a customer, I am using Adobe Indesign CS3.
    I use an outside company for the printing job called 4over (4over.com) and they require you use their cmyk pdf print engine so they can do the job properly... Basically to break it down: I am in Indesign CS3, I choose Print, and as the printer I choose their "4over pdf cmyk print engine" so the colors do not convert and the color doesnt change when they use their printers.
    4over is telling me my document is in pantone color mode, they can see the pantone color 371C, but not the cmyk values.
    How do I change from pantone color mode to cmyk color mode???
    if anyone can help me please. I would really appreciate it.
    I attached the file I sent to 4over incase that helps anyone answer my question.
    Thank you,
    Brandon

    Before exporting, in the swatch panel, select your Pantone colour, right click and select swatch options. Change the color type to Process and the color mode to CMYK.
    If it's a business card and you showed the client a pantone swatch, know that you won't get the same colour results. There's a very useful Pantone book available that shows swatches side by side with CMYK values.
    http://www.pantone.com/pages/products/product.aspx?pid=283&ca=1&s=4

  • Is there a way to convert a Word document with Red and Black into Spot colors in Acrobat X?

    Customer sent us PDF files created in MS Word. Of course, Word creates CMYK versions of colors. I need the red text and black text converted into spot colors for 2 color output on press. Is there a way to do this? I saw another thread that said there is a Fixup in the Print Production/Preflight section of Acrobat X that has a convert to Spot, but I'm not seeing that. All I see is Convert to CMYK. I'm using Acrobat X 10.1.13 on OS X. Any help would be appreciated. He also sent the Word docs so I can drop that into InDesign and reformat the whole thing and fix the colors myself but if I can do it in Acrobat, that would be a lot quicker. Thanks!

    Frequently in this scenario the red will be 100% of either magenta or yellow with 0% black. In these cases you can merely plate the Black & Magenta (or yellow) for press.
    I've created a Preflight Fixup on occasion for these also.
    An example shown - Note it requires the document is cmyk. MS Files will be rgb. You could create a Preflight looking for rgb colors.
    With Fixup tab selected - Options > Create New Fixup > Type of Fixup - search for Spot in the field

  • [CS4-5.5][JS] Problem convert spot colors to process

    Hi,
    I'm trying to convert all spot color swatches to process, but for some strange reason, some weird behavior occures.
    First I tried this piece of code...
    app.activeDocument.colors.everyItem().properties = {space:ColorSpace.CMYK, model:ColorModel.PROCESS};
    After running the script, the color icon changes, indicating the colorspace/model is changed. But when checking the color in detail, it's still a spot color.
    Just as a test, I tried this piece of code...
    function convertColors2Process(){
         for (var i = 0; i < app.activeDocument.colors.length; i++){
                var myColor =  app.activeDocument.colors[i];
                if ((app.activeDocument.colors[i].name != "") && (app.activeDocument.colors[i].name != "Registration")){
                        if (app.activeDocument.colors[i].model != 1886548851){
                              while(myColor.model != ColorModel.PROCESS){
                                        myColor.model = ColorModel.PROCESS;
                                        myColor.space = ColorSpace.CMYK;
                                            myColor.colorValue = [50,20,30,40];
    Now, the color thumbnail changes to the new color, but again, when checking the color. It's still a pantone color with the old values.
    No error occures when running the script and I'm able to change the color manualy in Indesign.
    How do I change the colour mode of all spot colors to CMYK?
    Thanx
    John

    Hi Larry,
    I've tried using ...
    function convertColors2Process(){
         for (var i = 0; i < app.activeDocument.inks.length; i++){
                                    app.activeDocument.inks[i].convertToProcess = true;
    This will modify the ink manager to process the spot color as process color, but the color itself is still unchanged....
    How do I modify any spot color to process color and change the colour mode to CMYK?
    Thanks

  • How to convert a PDF's Process Black to spot color

    We have been asked to build InDesign templates for a two-PMS-color math book. The design calls for two PMS colors: a dark blue for most text and red highlights.
    Because our Math plug-in doesn't work easily with PMS colors (it defaults to Process black), we hope to create all the “blue” text in Process Black. The press PDFs will have two inks: Process Black and PMS red. On press they will print the black plate in our blue PMS color.
    This plan works on press, but for non-press use, we also want the PDFs to visually match the blue and red printed book. Ideally we would convert the Black Process ink to a blue spot but I'm not sure if this can be done.
    Question 1: Does anyone know of a way to convert Process Black in a PDF to a spot color? Pitstop can convert spot to process, but we want the reverse.
    Question 2 (which I may also post in the InDesign forum) Do you know of a way to redefine (or alias?) the indesign black swatch so that it functions as a spot color?

    1 - yes, you can do this with Preflight in Acrobat Pro, but it's not on the default set of fixups.
    Open Preflight, select "Single fixups" - the wrench icon
    Options > Create New Preflight Fixup
    Give it a name (e.g. "process black to spot")
    Choose the Color category in the upper right
    Choose 'Convert to spot color' in the upper left
    Define the source parameters in the main panel (in your case, CMYK%, 0-0-0-100 with tolerance 0)
    Define the spot color to change this color into, and the alternative space for rendering (i.e. your blue color)
    If you wish, add a check to limit the conversion to certain things (e.g. text, vectors, etc.)
    Click OK to save the fixup, then click FIX to apply it. To verify the result, use the Output Preview dialog in Acrobat.

  • Printing more than 27 spot colors HELP

    I have been printing a document that I use more that 27 spot colors, I use a Xerox Docucolor 240 which supports printing pantone colors.  I have been printing this document for 3 years now when I try to print this document I am getting an error.  It wants me to convert my spot colors to process, but when I do this my colors do not print properly. Any Ideas?  It is very important my colors print correctly for this document, I can not convert them to process.  Why has this stopped working for me now?

    Hi Tracy. I found this post when searching for a solution to the same problem! Our workflow incorporates a lot more spot colours than 27 as we are merging a document which imports graphics/images according to a customer's branding. We have to use spot colours so that we can tweak them to a closer match when temperature/new fiery updates etc change the colours away from the orginal created (our customers have literature printed months, sometimes years later than when created). We simply wouldn't have time to manually input tweaked colour values to all the artwork documents we handle.
    Anyway, Tracy I also ran into the same problem. We used to be fine merging, with each page being created and added so we end up with a multipage file after the merge, and then we can spool to print in one hit. Now all of a sudden we have this error too. No I haven't found a solution either! Please do let us know if you find an answer.

  • Can I have "All spots to process" checked at all times, even for new spot colors?

    When I check “All spots to process” in the pdf export settings and save my settings the settings remember that I've checked this option. But, if new spot color objects using new spot color swatches are added to the document (or another document) and I go into the pdf export settings the check mark has been changed into a dash (with the actual checkbox highlighted) – signifying that only some of of the spot colors will be changed to process colors during export. I absolutely fail to see how this could possibly be seen as a feature and not a bug … if the user has checked “ALL spots to process” wouldn't the user expect ALL spots to be converted to process colors, rather than just any spot colors that happened to be in the document that happened to be open when the user first checked that checkbox and saved that setting?
    Am I missing something here? What's the point of even having that checkbox as part of your saved export settings if it doesn't include any other spot colors than those used when saving the settings?
    What's the point of having settings if you can't trust them, and still need to manually "override" them every time?
    I see that some users have taken to writing scripts that instead turn all spot colors in the swatch panel to process colors, and while I commend them for creating that workaround, I'm still pissed at Adobe for not getting the function right.
    If this is a feature, who is it for? People who want to add just certain spot colors and turn those into process colors rather than turning all spot colors into process colors are surely better off doing that in the swatches panel, where they're in total control of what's what. And if they don't want to "permanently" change their spot colors to process colors, and prefer to (temporarily) convert them during exporting/printing only, they can do that in the ink manager. But when someone checks convert "All spots to process" couldn't we safely assume they really want ALL spot colors to be converted and not just some of them? I mean, the way that checkbox behaves now, it's like it's a button and not a checkbox. As in: hit the button "All spots to process" to switch all currently viewed spot colors to process colors in the ink manager, OR check the "All spots to process" checkbox to always convert ALL spot colors to process colors during exporting/printing.
    Anyone got any light to shed on this?
    And is there a way to actually get the advertised behavior, because if you have to run a script every time you export/print you might as well just manually select the checkbox every time instead, but either way it's just really unnecessary as far as I'm concerned … Adobe should get the feature right instead.
    If you save a setting and recall it, it shouldn't be possible for that setting to change into something else (in this case changing a checkmark to a dash).
    Clearly CMYK printing is the norm, so for most users it would make a lot of sense to have the "All spots to process" checked most of the time, and then you just go into the swatches panel or the ink manager and set things correctly for those print jobs that really do need spot colors.
    I myself am not one of those who add spot colors to my swatches unless I'm really using them as spot colors, but I often work with magazines and folders featuring adverts made by whoever, and typically there's always at least one advert that features spot colors, and therefore it would be very nice if the "All spots to process" feature actually worked as advertised without any required actions from me.
    We stopped sending ads back to the advertisers for adjustments a long time ago, unless we absolutely had to, because there were so many things wrong with so many ads that it was simply too much work to write back and explain everything to people who most of the time didn't even understand what we were talking about. We found that it was usually a LOT faster and easier to just adapt the ads ourselves, as long as it was something that could be worked out really quickly from within InDesign itself, which pretty much included most typical errors.
    But with this feature I find Adobe is trying to make my job harder rather than easier, and it's pissing me off. Arrrghh… ;-)

    But It's not a preference it's a shortcut
    It's a bad joke, is what it is. ;-)
    So, why in your opinion should it be presented the way it is? I keep saying in it's current functionality it shouldn't be presented the way it is (and that: if it is, it shouldn't work the way it does). If it's not a preference or even a proper checkbox, why present it that way?
    If you put it right next to the table at the top of the window (so that it's directly associated with that information, rather than information right above it) and just called the checkbox “Spot(s) to process” and had it only visually reflect the content of the sleected spot colors in the table, then I'd see your point with likening it to the “Hyphenate” checkbox.
    If a story has two selected paragraphs that uses two different hyphenation settings then the checkbox should present the way it does now, but if you hit the checkbox so that both paragraphs now use hyphenation and create a third paragraph inbetween the two previous ones it better inherit that setting and not turn off hyphenation for the new paragraph (unless of course there's a defined next paragraph style that switches to a style with hyphenation turned off). And if that checkbox said “Hyphenate all paragraphs” instead, then I would expect it to do just that, and not just the selected ones, and not just the current paragraphs but quite literally all paragraphs even newly created ones – otherwise it doesn't do what it says it does, and simply shouldn't be labeled that way.
    And seriously bad interface design aside, you'd have to rename “All spots to process” to “Switch all currently displayed spot swatches listed in the table above to process” to actually describe what that checkbox does. So even if you're a fan of the current functionality, as opposed to one that actually lets the user set and forget a setting like that, and think it's better that users manually check it repeatedly (which I'm not saying that you are, but you're not giving me any feedback suggesting you even see my point of view with any of this, so what do I know?), then why wouldn't you still support an interface that visually matches/signals that functionality better? If it's a “Select all” checkbox supplementing a table containing a column of checkboxes, then present it that way. Don't put it at the bottom of the window next to another checkbox that works just like a regular checkbox and label it “All spots to process” – because that way you are signalling a different behavior.
    Seriously, if I was to do design using the same mentality that Adobe uses when designing their user interfaces it wouldn't be long before I lost all clients. There's a lot to be said for de facto monopolies, I suppose. Oh no, there's nothing wrong with the design, just as long as you accept it on it's own terms and don't compare it to anything relevant, and just as long as you give people enough time to understand and accept it … and surrender to it.
    For real … I wouldn't win one single pitch that way.
    Today's threads have in many ways been a thorough reminder of the following quote from the second link I provided:
    Is there an Internet rule yet stating that even the most obviously indefensible mistake will eventually be defended by someone somewhere? Awful marketing efforts get explained as genius viral campaigns, broken features become solutions.
    And whether or not you're able to see my point of view or not is really besides the point too.
    The real point was, and remains to be:
    That for those who receive lots of ads or other external files that may or may not contain spot colors it would be far more useful to be able to set a checkbox to always convert all spots to process when exporting, than the current functionality is (and I'm not suggesting eliminating the current functionality, just change so it's presented like what it really is, and then just let that separate checkbox do what it says) … causing unnecessary manual action on the user's behalf shouldn't be the business of Adobe – preventing it should.
    And here's further reading on the subject of bad Adobe interface design for those who might feel so inclined. ;-)
    Cheers!

  • Spot colors not being saved.

    In CS6 I have been having random situations where the spot color channels are not saved when saving a .psd, regardless of the settings in the save dialog box. Any idea of why this might be happening? I've even had the program dump the spot colors from a multichannel document today while trying to find a workaround. I considered converting the spot colors to alpha channels as well, but there doesn't seem to be an obvious way to do that. Odd, as alpha to spot color conversion is just a radio button away. Any help would be appreciated, thanks!

    This is on an Intel I Mac running Maverics 10.91 (lots of problems with that).
    These are RGD documents at 8 bits per channel. The layers have always been merged at this point.
    The spot colors involved are mostly book colors (Pantone Solid coated), though the program drops custom spot colors (u-white in the screen shot) as well on the occasions when it happens. This began occuring with CS6. I have noted in the forums that the book definitions may have changed, I am revising my actions to move to the current book definitions, though why this would affect a user defined spot color is unclear.In the cases where this occurs, only the "Art Mask" channel would be saved (it's an alpha).

Maybe you are looking for

  • How can I know if a table is truncated or deleted in any moment?

    Hello, How can I know (if I can) if a table is being deleted or truncated at any moment over the time? Thanks

  • Integer Data Type not displayed correctly in Interactive Report

    Hi, When creating a report using BI Publisher 11.1.1.6.2 it appears that any of my fields that contain Integer values (regardless of the order in which the field is displayed) do not correctly display - instead they are displayed as NULLs with the oc

  • Query works great in 9i, but on 10g massive slow down.

    Hi, I am facing some trouble when running a query in 10g and i don't know why.It is currently working fine in 9i. The query is like this: delete from x where (a,b,c,d,e,f) in (select a,b,c,d,e,f from y where site='AMERICA' and appli='ORACLE') and sit

  • Multiple screens turning on and off (10.9.5)

    Hi Have some serious issues, that makes working with my new iMac impossible System setup: Two 47" TVs (Philips) connected thru Thunderbolt and adapters to HDMI One of the TB-port also has the Apogee ThunderBridge, after that the TV MacOS 10.9.5 With

  • Play back Volume Help

    Anyone know how to set the playback volume so that all the songs on my ipod will play at the same level? When I'm playing the songs through my car stero, some songs I have to turn the stero volume up and others I have to turn the volume down. I have