Action to change specific colors

I am creating an action to change two specific colors in the files of different logos of ~ 300 (.ai and .eps). I just Photoshop so I guess that there is a way to create a droplet of an Illustrator Action, but that is a different issue.

The colours are Pantone 143 and 287 that have to be changed to 143 you and 287 U, respectively.

Here are the steps that I think I need to save for my action:

  • Unlock all layers
  • Add new colors to the Board of swatch
  • Select all layers
  • Recolor art... (Edition-> Edit colors-> redefine colors work... This step is not recorded?)
  • Save file

The problem is that the step to redefine is not saved. Can someone explain what I should do to create this action correctly?

JavaScript is the answer. I found this somewhere a little while back. This script changes Pantone 133 to 101. It can be modified to apply to all other Spot colors.

This script requires that the new color and old color exist in your Swatches palette before running it.

#target illustrator

var docRef = app.activeDocument;
with (docRef) {
          var replaceColor = swatches.getByName('PANTONE 101 C').color;
          for (var i = 0; i < pathItems.length; i++) {
          with (pathItems[i]) {
                    if (filled == true && fillColor instanceof SpotColor) {
                              if (fillColor.spot.name == 'PANTONE 133 C') fillColor = replaceColor;
                    }
                    if (stroked == true && strokeColor instanceof SpotColor) {
                              if (strokeColor.spot.name == 'PANTONE 133 C') strokeColor = replaceColor;
                              }
                    }
          }

          for (var j = 0; j < stories.length; j++) {
                    with (stories[j]) {
                              for (var k = 0; k < characters.length; k++) {
                                        with (characters[k].characterAttributes) {
                                                  if (fillColor instanceof SpotColor) {
                                                            if (fillColor.spot.name == 'PANTONE 133 C') fillColor = replaceColor;
                                                  }
                                                  if (strokeColor instanceof SpotColor) {
                                                            if (strokeColor.spot.name == 'PANTONE 133 C') strokeColor = replaceColor;
                                                  }
                                        }
                              }
                    }
          }
}

More answers can be found here, like how to unlock everything.

http://forums.Adobe.com/community/Illustrator/illustrator_scripting?view=discussions

Tags: Illustrator

Similar Questions

  • Action for changing the color mode?

    Is it possible to create an action to change CMYK to RGB color mode in a batch of files? I've been deleting on the creation of this action.

    Thanks in advance.

    Toni

    Use the command for an item of Menu insertion through the menu in the Actions Panel to record this step.

  • How to permanently change the color of a button

    I use an action to change the color of a button.  It works but the color changes for only about a second and then back to the original color.  How can I make the color change permanently?

    Sigh, if a question was clear, that he would not take as long to get a response. I knew there was more than simply by changing the color of a button, where my questions.

    Personally, I would never trust effects for this particular case. They do not always work as expected and even less in 8.0.1 then 7. In addition, as this has always been the case, the application of effects by a step (or shared action) has a lot of limitations, because you cannot set the duration of effect, or specify the path, if it is a motion effect. The only solution that I found and explained a long time ago was to create a custom effect to apply. But the workflow is quite heavy: first he must create the effect based on time with the correct time and settings, then you can save it, but it won't be available immediately in the drop-down list in the dialog of AA. You must apply the effect custom time once, before it becomes available. BTW, the default duration of the tint to apply is 2secs, which cannot be changed in the AA dialog box.

    I don't see your response to Ajit, for some reason, maybe because it is personal and I am just a user. My approach would be to replace the original button with a touch of the color that you want, something as I used in the dashboard in this blog: Captivate 8 - first adventures - Captivate blog

    Forums act as strangely today as effects in Captivate, now the answer to Ajit popped up.

    Text buttons will always have the appearance of the system buttons, you can not change their color. It can be done with text buttons but once again, I never use them more because the form buttons appeared. Those are much easier to style and offer more choices. Furthermore they can be used on master slides and timed for the rest of the project, and you can even insert on Question slides.

  • Change the color of the development of the action bar

    Hi all

    Please help me on how to change the color of the focus of the action bar, the default color of the action bar is blue I want to change it to yellow.

    Thanks in advance.

    Do not think, that can be done with the latest version of the SDK.

    See this http://supportforums.blackberry.com/t5/Cascades-Development/How-to-change-tabbed-pane-background-col...

    -Dishooom

  • Change the color of the text in several .psd with actions

    Is there a way to change the color of the text layers in several files in .psd (with a different text in each of them) with actions?

    All the files that I have to do that with are structured in the same way - background and above a layer of text.

    Here are the basics...

    #target photoshop;
    main();
    function main(){
    //select folder where PSDs are held
    var selectFolder = Folder.selectDialog( "Please select folder of PSDs");
    //if no folder selected quit.
    if(selectFolder == null) return;
    //get an array of all PSDs in the folder
    var fileList = selectFolder.getFiles("*.psd");
    //iterate through file list
    for(var a in fileList){
    var textColour = new SolidColor();
    textColour.rgb.hexValue = "00ff00"; //set colour to green
    open(fileList[a]);
    activeDocument.activeLayer = activeDocument.artLayers[0];  //Select top layer
    if(activeDocument.activeLayer.kind == LayerKind.TEXT){ //check if it is a text layer
    activeDocument.activeLayer.textItem.color = textColour; //set text to colour
    activeDocument.save(); //Save changes
    activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
    }else{//not a text layer so close document
     activeDocument.close(SaveOptions.DONOTSAVECHANGES); //Close document
     }
    }//end of filelist
    };
    
  • Action to change the border color changes the color of full object instead

    Whenever I try to do an action in which I change the color of the border, the action is not the way that I save it. Instead to change the border color, as I did in the record, the action changes the color of the whole object (for the color that I have saved) and leaves the border to be black.

    Ok. I think that actions make a difference between the stroke and fill. If you have an action to apply a swatch/color, it will apply this color to everything you have 'face' (look at your tool palette: fill overlaps the race?).

    to get what you want, you may need to make a graphic with the fill color style, as you want and use the action to apply instead of the shade.

  • How to change a different color-specific colors in Illustrator javescript

    Hello

    How to change a different color-specific colors in Illustrator javescript

    Of (Scolor specific)

    C:85

    Y:50

    M:0

    K:0


    To (wasnother color)

    C:50

    Y:100

    M:0

    K:0

    Screen Shot 2016-02-13 at 6.41.04 PM.png


    I'm sure of if statement in the code change could be cleaned.

    but this should work for you.

    function reColorSelection(){  
    
        var col = new CMYKColor;
        col.cyan = 50;
        col.magenta = 100;
        col.yellow = 0;
        col.black = 0; 
    
        var oldCol = [];
        oldCol.C = 85;
        oldCol.M = 50;
        oldCol.Y = 0;
        oldCol.K = 0;
        oldCol.tolerance = 1;
    
        var sel = app.activeDocument.selection;
        for(var i=0; i < sel.length; i++){
            if(sel[i].typename === "CompoundPathItem"){
                for(var j=0; j< sel[i].pathItems.length; j++){
                    modify(sel[i].pathItems[j]);
                }
            }
            modify(sel[i]);
        }  
    
        function modify(obj){
            if(obj.fillColor.cyan >= (oldCol.C-(oldCol.tolerance/2)) && obj.fillColor.cyan < (oldCol.C+(oldCol.tolerance/2))
                && obj.fillColor.magenta >= (oldCol.M-(oldCol.tolerance/2)) && obj.fillColor.magenta < (oldCol.M+(oldCol.tolerance/2))
                && obj.fillColor.yellow >= (oldCol.Y-(oldCol.tolerance/2)) && obj.fillColor.yellow < (oldCol.Y+(oldCol.tolerance/2))
                && obj.fillColor.black >= (oldCol.K-(oldCol.tolerance/2)) && obj.fillColor.black < (oldCol.K+(oldCol.tolerance/2))){
                    obj.filled = true;
                    obj.fillColor = col;
            }
        }
    }
    reColorSelection();
    
  • Is there a quick way to change a specific color in an image without masking or select an object?

    Is there a quick way to change a specific color in an image?  I mean, for example, slecting an object in the image and change the color of the object which may involve masking, etc..  What I want is a quick way to change the bokeh or part of the bokeh from an image to a nicer color.  Maybe something like help of the color picker to choose a specific color in the image and to be able to change all the colors with this exact value (hexadecimal number)?  Not sure if I explained it very well.  But I'm looking for something more specific while playing with the color sliders - I want to be able to choose the exact color for areas of interest of my image.

    The description you give is something that Photoshop does, but Lightroom does not.

    You can use Lightroom to brush an area to have some white balance, but this seems different from what you are trying to do (and it is not "fast" anyway)

  • Find a specific word and change its color in InDesign

    Hello

    I was wondetring if there is a script that runs automatically on InDesign startup that can find the specific words and change the fill color of this word and this word only.

    I have a table in InDesign that fills with the name of the week (Monday, Tuesday, Wednesday, etc.), so that every time you see all the names of the week, but every day they change places. I need a script that can find, for example, the word 'Saturday' and change the color from black to yellow.

    Any help would be appreciated!

    -Windows7 CS6 Indesign

    with respect,

    Amir

    Y at - it a paragraph style applied at this time?

    If so, you can create a GREP style in the paragraph style.

    Make "new Style GREP.

    Text: Saturday

    Apply the Style: A new Style of character

    In the new character Style, only change the fill color and name the style.

    It should work.

  • LaserJet MFP M277 PLC6: Cannot change the color settings, specifically in the category of graphs

    I need help on how to change the color for printer settings. I am unable to print graphics on forms, they come out as a solid black box. When I go into the color options I'm completely unable to change, there is no options to change anything: it only shows as neutral gray and black graphics.

    The printer has been the subject of assessment, and there are no exceptions to this topic. Please help.

    Your question is usually a driver problem.  Try to use pcl5 or postscript driver to see if one of them makes a difference.

  • How can I create several files that change a specific color on each of them with her do manual

    Our mission was to make maps of 1200. But they want each card to another color with everything else the same. How to do that without going in and changing each color individually for each card using illustrator.

    I'll have a go while all experts are curled in bed...

    I would choose all areas to fill

    Then use the random colors of color Tweeks

    Free Adobe addons

    https://creative.Adobe.com/addons/products/3288#.V-Mi6fkrJhE

    then maybe tweek the colors in the Panel redefine illustrators

    uncertain as to the implications of RGB if

  • Change the color of a specific character in a text.

    Hi guys! for a project I need to change the color of each "a" in a text. Is there a way I can do it automatically?

    Aaaah! Try using a simple grep style!

    If you need to play in all the paragraph styles, map of style grep using this very clever script written by Colin Flashman, King of merge data!

    https://DL.dropboxusercontent.com/u/55743036/grepstylemap.jsx

    or a simple F/R.

  • Change the color of specific links

    On a web page, I want to change the color of the links. I found other issues in the Council on this subject, but when I try to their answers, it will not work for me. Can someone tell me how to make these links on white blue background? I have CS5 DW. Here is the page:

    http://www.gaditesmaritime.com/links2.html

    Give thecell link/s is / are in a 'class' (see below), then wrap your link in an anchor tag to actually make a link (see below)

    http://www.bahamasmaritime.com"> www.bahamasmaritime.com".

    Then add your css styles below:

    .blueLinks a {}

    text-decoration: none;

    color: #069;

    }

    .blueLinks a: hover {}

    color: #099;

    }

  • change the color of line based on the value of column 5 Apex in the classic report

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Hello

    I know this question has been asked several times here, but I'm working on 5 Apex and need to know the correct way to do it in this version.

    I need to change the color of the text of the entire line (no background color) based on the value in one of the columns of the classic report. I have just two conditions, if the value of column = Yes, color should be red, otherwise it must be green.

    I am new to jscript and css, so appreciate if someone can tell me the solution with steps.

    I have already checked this link that changes the value of the column, need to do something similar to the whole line.

    https://tylermuth.WordPress.com/2007/12/01/conditional-column-formatting-in-apex/

    Hi coolmaddy007-Oracle,.

    Here's an example set up on the apex.oracle.com according to the specifications you gave: https://apex.oracle.com/pls/apex/f?p=35467:1

    Version of the apex 5.0.0.00.31

    Standard universal theme

    Page theme default template

    Classic report

    Foldable report template

    Here is how it is done:

    Create a dynamic action with the following specifications:

    Name: Give the appropriate name

    Event: After refresh

    Selection type: region

    Region: select your region classic report

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $('td[headers="JOB"]').each(function() {
      if ( $(this).text() === 'MANAGER' ) {
        $(this).closest('tr').find('td').css({"color":"red"});
      }
      if ( $(this).text() === 'SALESMAN' ) {
        $(this).closest('tr').find('td').css({"color":"green"});
      }
      if ( $(this).text() === 'CLERK' ) {
        $(this).closest('tr').find('td').css({"color":"blue"});
      }
    });
    

    NOTE: Download the selector appropriate for your knowledge $('td[headers="JOB"]') case using firebug/browser development tools.

    Items concerned: leave blank.

    PS: Changed the example to change the color of text instead of the background color.

    I hope this helps!

    Kind regards

    Kiran

  • How can I change the color of the fonts displayed on Firefox itself?

    Not Web sites; I know how to change the font style and color used on Web sites. What I was asking is how to change the color of the font of the text displayed on the interface of Firefox itself. Specifically, I want to change the font of the text '100% ' at the top of the Zoom option, since I have no idea when or how it changed (could be me; I do remember never do, however); I have attached a screenshot for better reference.

    I was wondering, but did not before, if it remains green if you move to another bar. In other words, is there something special about this area of bar bar/menu top of the title page which affects the color of the font.

Maybe you are looking for