Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Changing many cells fill colour

Return to Member Forum

  • Author
    Posts
    • #104676
      Tom Pardy
      Member

      InDesign CS6 on a Mac with Mac OS 10.10.5.

      I have a large table (around 1400 rows in six columns threaded through 25 pages – phew!) and several of the cells have a fill colour of cyan tinted to 5%. They are not contiguous cells (except in some cases) as there are other cells with other fill colours. And no, they have not been allocated a specific cell style – I haven’t yet worked out how to work with cell styles.

      What I want to do is change the fill tint of all the cyan filled cells from 5% to 10%. Is there some way to do this using the find-and-replace dialog box? Or do I need to go through laboriously and change each one manually (please not!)

    • #104678

      Hi Tom,
      maybe someone here can write a script specifically to do that because AFAIK there’s no such function inside InDesign.

      Even without using cell styles I suggest to create at least a Tint swatch before applying a fill color randomly to a huge table like yours. So that you could change the tint to change the fill color to all the cells.

      If you’ve used the Color panel to apply the fill color instead of the Swatch panel, then you could use the “Add Unnamed Colors” command in the Swatch panel flyout menu to create a 5% cyan swatch applied to the cells and change all the color fill using the new color swatch.

    • #104689
      Vinny –
      Member

      Something like this maybe?

      if (parseFloat(app.version) < 6) {
      main();
      }else{
      app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, “Change cyan tint”);
      }

      function main() {

      if (app.documents.length > 0) {

      //Variables
      var
      myDoc = app.documents[0],
      myCells = myDoc.stories.everyItem().tables.everyItem().cells.everyItem().getElements();

      for (i = 0; myCells.length > i; i++) {

      if (
      myCells[i].fillColor.name != ‘None’ &&
      myCells[i].fillColor.colorValue == ‘100,0,0,0’ &&
      myCells[i].fillTint == 5) {
      myCells[i].fillTint = 10;
      }
      }

      } else {
      alert(“Open a document”);
      return null
      }
      }

      https://codeshare.io/G8ZPlD

    • #104730
      Tom Pardy
      Member

      I have posted two replies to this thread and they have never appeared. Therefore, unless this reply appears, I am unable to thank either of my respondents.

    • #104685
      Tom Pardy
      Member

      Thanks for your prompt reply, Claudio. So far nobody has offered a script but I live in hope. :-)

      Your suggestion of creating a specific swatch is a good one and, if no script emerges, that is probably the course I will follow.

    • #110656

      If you always create a specific color for a task, and dont use a tint of a standard-color, you can change this color global afterwards.
      Newer use a tint af a color!

    • #110657
      Vinny –
      Member

      “So far nobody has offered a script but I live in hope. :-)”

      Really? I have provided a small script on July 2nd, didn’t I?
      Maybe it doesn’t work as expected, then please provide some feedback.

Viewing 6 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads