Skip to main content
Participating Frequently
March 8, 2021
Answered

Fill cells in table based on one color

  • March 8, 2021
  • 4 replies
  • 809 views

I've many tables in InDesign. The table cells are shaded alternating. There is a border in darker color.

Is it possible to set a base color for a whole table once and color the cells and borders based on this color automatically? Or do I have to create a cell style / table style for each used color individually?

This topic has been closed for replies.
Correct answer Barb Binder

Is it possible to set a base color for a whole table once and color the cells and borders based on this color automatically?


By @konradSL


My apologies, I missed that part of the question. To clarify, InDesign does not allow you to set a base color for a table.

 

You would need a swatch for each table color, a separate cell style for each table header (I don't see the body cells as needing anything different), and a separate table style for each color to nest the individual header cell styles and to control the alternating color. 

 

As a note, scripting and plug-ins can solve all sorts of dilemnas that InDesign can't handle natively. I'll add a scripting tag to your post to see if that helps. 

 

~Barb 

4 replies

Barb Binder
Community Expert
March 8, 2021

We are always happy to help, @konradSL.

 

~Barb

~Barb at Rocky Mountain Training
Barb Binder
Barb BinderCorrect answer
Community Expert
March 8, 2021

Is it possible to set a base color for a whole table once and color the cells and borders based on this color automatically?


By @konradSL


My apologies, I missed that part of the question. To clarify, InDesign does not allow you to set a base color for a table.

 

You would need a swatch for each table color, a separate cell style for each table header (I don't see the body cells as needing anything different), and a separate table style for each color to nest the individual header cell styles and to control the alternating color. 

 

As a note, scripting and plug-ins can solve all sorts of dilemnas that InDesign can't handle natively. I'll add a scripting tag to your post to see if that helps. 

 

~Barb 

~Barb at Rocky Mountain Training
konradSLAuthor
Participating Frequently
March 8, 2021

Thanks. Thats much more than I excpected 🙂
Even the cell styles are a big help

Barb Binder
Community Expert
March 8, 2021

I would set this table up using nested styles:

  1. Create two paragrapah styles: one for the heading row and the body rows.
  2. Create two cell styles:
    1. One for the heading row with the dark green background, and nest the paragraph style for the heading row.
    2. One for the body rows without a background color that nests the paragraph style for the body rows. 
  3. Create a table style for the entire table to define the border around the outside, and alternate the body row shading. Nest the cell styles in the table style.

 

Once set up, you can format the entire table with a single click. 

 

~Barb 

~Barb at Rocky Mountain Training
konradSLAuthor
Participating Frequently
March 8, 2021

Wow. Works fine for one table. But to color each table in another color, I do need to create n cell styles (one for each color) and therefore n table styles (one for each header style), don't I?

Eric Dumas
Community Expert
March 8, 2021

Hi,

Can you confirm the version of your software and operating system?

A screenshot would help understand your query better.

If you use alternating colouring of the cells, a base colour would not make sense, but you could adjust the alternating colours. 

I find that adding colours to the Table style, then cell styles... sometimes does not return the result I was expecting.

konradSLAuthor
Participating Frequently
March 8, 2021

I use InDesign 16,1 x64 on Windows 10.

Something like this with different shades/transparencies of the base color: