7 Replies Latest reply on Jul 26, 2016 5:29 AM by Jeffrey_Smith

    Changing multiple box single colors at once

    SID Leipzig

      Hello,

       

      I am creating a neutral gray test form in Indesign with 120 square boxes made up of only cyan, magenta and yellow, each box having differing shades of magenta and yellow. Cyan stays the same for all patches and black is zero (e.g. C 43 M28 Y28 K0, C43 M40 Y40 K0, etc). After copying this test form I would like to change only cyan for all 120 boxes without changing magenta and cyan at the same time (e.g. C 45 M28 Y28 K0, C45 M40 Y40 K0, etc). I have tried selecting all boxes and only changing cyan value but then all the patches change to the same color instead of magenta and yellow being left alone. The only solution I have is selecting each individual box, changing only the cyan value and continuing to the next box. After 120 patches and 15 test forms (1800 individual patches!!) this can become quite tedious.

       

      Can anyone think of a better solution?

       

      Thanks

        • 1. Re: Changing multiple box single colors at once
          Derek Cross Level 6

          Not entirely sure what you're after, but would setting up an Object Style(s) suit your purposes?

          • 2. Re: Changing multiple box single colors at once
            SID Leipzig Level 1

            Hello,

            I can try to simplify what I'm after. I create three boxes where cyan and black values don't change, only magenta and yellow are different:

            Box 1: 43C 28M 28Y K0

            Box 2: 43C 30M 33Y K0

            Box 3: 43C 35M 40Y K0

             

            I copy and paste these three boxes and want to then only change the cyan values, leaving all other values alone:

            Box 1: 45C 28M 28Y K0

            Box 2: 45C 30M 33Y K0

            Box 3: 45C 35M 40Y K0

             

            I then also copy and paste these three boxes again and want to only change the cyan values:

            Box 1: 48C 28M 28Y K0

            Box 2: 48C 30M 33Y K0

            Box 3: 48C 35M 40Y K0

             

            At the moment I cannot find a way to do this simultaneously for each copy. For example, select all three boxes, change the cyan value and press enter. This leads to all three boxes having the same color: e.g. Box 1, 2 and 3: 45C 28M 28Y K0. This is not what I want.

             

            The only solution is clicking each individual box one at a time, changing cyan and pressing enter. As described above this can become quite tedious when dealing with more than three boxes :-)

             

            Thanks for your help!

            • 3. Re: Changing multiple box single colors at once
              Peter Spier Most Valuable Participant (Moderator)

              This might be scriptable, but I wonder why you need to make this chart yourself. Is it the particular numbers? There are similar test charts available online, CMYK charts - free PDF download for example.

              • 4. Re: Changing multiple box single colors at once
                JanCE Level 1

                Peter Spier is right - this is task for script, no other faster way...

                If you still need help with this than try script posted below (use the bold text including the curly braces at the end).

                (for how to instal scripts read http://indesignsecrets.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-o r-blog-post.php).

                I did not invest a lot of time into it, so it has no user interface, and you have to open the script and change 3 values (and save) to apply different seettings... but that is nothing compared to changing hundreeds of patches. Also practical would be to assign a keyboard shortcut to run the script.

                And don't forget to make backups of your work before running the script in case something goes wrong...

                PS: Let me know if it helped you.

                 

                // Replace the letter in line 2 to choose which separation to change. ("C" = cyan, "M" = magenta, "Y" = yellow, "K" = black) Than change the numeric values in line 3(findValue) and line 4(changeToValue). Save and run on selection of objects.

                var separation = "C";

                var findValue = 80;

                var changeToValue = 10;

                 

                var sel = app.selection;

                for (i=0; i<sel.length; i++){

                    if (sel[i].fillColor == "[object Color]"){

                        var CMYK = sel[i].fillColor.colorValue;

                        if (separation == "C" && CMYK[0] == findValue){

                            CMYK[0] = changeToValue;

                            sel[i].fillColor.colorValue = CMYK;

                        }   

                        if (separation == "M" && CMYK[1] == findValue){

                            CMYK[1] = changeToValue;

                            sel[i].fillColor.colorValue = CMYK;

                        }   

                        if (separation == "Y" && CMYK[2] == findValue){

                            CMYK[2] = changeToValue;

                            sel[i].fillColor.colorValue = CMYK;

                        }   

                        if (separation == "K" && CMYK[3] == findValue){

                            CMYK[3] = changeToValue;

                            sel[i].fillColor.colorValue = CMYK;

                        }   

                    }

                }

                • 5. Re: Changing multiple box single colors at once
                  AriEss Level 1

                  Just pointing out (as you're probably not aware) that you can use the advanced editor to format your code.

                  • 6. Re: Changing multiple box single colors at once
                    JanCE Level 1

                    Thank you AriEss, I'll try that on next posts.

                    • 7. Re: Changing multiple box single colors at once
                      Jeffrey_Smith Most Valuable Participant

                      1. Create a layer with boxes made of yellow and magenta values.

                      2. Duplicate boxes, create second layer, paste boxes into exact position, colorize to desired cyan value (43%), apply 100% multiply.

                       

                      To create next version, hide YM layer, select all boxes on C layer and change to 45%.