TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to fill the cells of a table with a background color. How can this be done?

share|improve this question
For examples of how to do this, see color only a cell of a table and/or Color merged and regular cells in a table individually. – Werner Jan 11 '14 at 3:46
up vote 31 down vote accepted

The xcolor provides support for coloring table rows in a variety of patterns. The colortbl can color rows, columns, cells and rules.

There is a nice article by Lapo Filippo Mori in the PracTeX Journal that describes the usage of both packages. Scroll down to section 4.

share|improve this answer
@Sharpie Can the the xcolor package be used for completely coloring the table in one specific color in one go? I am trying to replicate the look of this table for my report. I read up on the colortbl package but it has a pretty limited palette. Do you have any pointers on how to write minimal code for that table using xcolor? Most tips involving xcolor are about alternating colored rows. – Ariel Dec 26 '11 at 16:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.