People have trouble visually connecting pieces of information in a row.
Alternate the background color of rows to subtly differentiate each row from surrounding rows.
Alternating row colors have been used for years, and many users will be familiar with them due to the ubiquitous “green-bar” reports. This pattern is also known as row striping, indicating the overall visual effect of stripes that it creates. Even if the alternating colors do not exactly align with your rows, it breaks up the visual monotony of long tables and provides a subtle visual guide when picking out particular rows.
Pretty much any visual designer will whap you over the head if you create a table/grid with a bunch of lines to divide rows and cells. They add a lot of visual noise when the same purpose can be achieved through judicious use of white space and, as described in this pattern, using color. This removes the need for the lines, and the colors, because at least one of them will contrast against the background color, will serve to create a visual outline of the table/grid without needing an actual outline border.
That said, if the table is only a few rows or columns, the value of alternating row colors is diminished and may even be distracting, so you probably don’t want to use it in those cases.
This pattern is so common that some UI technologies, like ASP.NET, provide built-in support for alternating rows in tables/grids in the form of controls that have item templates and alternating item templates. If that’s the case, you can take advantage of that for the purpose of supplying alternating row colors. If you don’t have that option, you can usually use the modulus operator against a row count variable (e.g., rowCount % 2 == 0) in a conditional statement to supply alternating colors. It is likely that reporting packages will also have built-in support for this pattern.
In terms of color choice, you should generally pick unobtrusive colors. This means low saturation (intensity) and, usually, neutral or cool hues (like blue, beige, gray, or green), assuming your text color is dark. If your palette uses dark backgrounds, then you might opt for a higher saturation or warmer hues. Regardless, the colors should provide sufficient contrast with the text color to be easily readable. You can have one row color match the background color, or you can pick two distinct colors, which may help further establish a visual outline of the table/grid.
If the contents of your columns cannot be sufficiently spaced to distinguish them from one another, you can opt to break up the row colors with your background color as an alternative to using column lines; however, if possible, it is generally preferable to try to sufficiently space/pad your columns to keep the design clean and uncluttered.
Infragistics has some tools that can jumpstart your efforts to implement this pattern. Broken down by technology, they are as follows.
Alternating Row Colors pattern is implemented in the following ASP.NET controls: WebDataGrid, WebGrid. Check out the samples browser to see it in action.
You can use the NetAdvantage for Silverlight xamWebGrid control for this.
You can use the NetAdvantage for Windows Forms controls: WinGrid and WinCombo to implement this pattern. If you download the NetAdvantage for Win Client bundle, you can find a sample in the WinForms sample browser called WinGrid -> Appearances to see it in action.
You can implement this pattern using the NetAdvantage for WPF XamDataGrid Control. If you download the NetAdvantage for Win Client bundle, you can find a sample in the xamFeatureBrowser called Alternating Row Highlighting to see it in action.
Alternating row colors are built in to the NetAdvantage grid. You can change the colors used, and specify more than two colors. An example is available here.
Alternating rows in an enterprise application. This data grid allows for multi-select of rows along with inline editing. Demonstrates a subtle alternating row color background, along with a bolder identification of the selected row (s) and a highlight for the current field focus.
http://quince.infragistics.com/11dv
The primary example for this pattern comes from Microsoft SharePoint. This theme uses a very subtle blue-grey as one color and matches the white background for the other.
http://quince.infragistics.com/112i
This example comes from NJ Transit’s Northeast Corridor line schedule. The colors have low saturation and match their overall palette. They take it a step further and provide guidelines for major stops. It is a pretty busy design, but it serves the purpose in this case. Since they distribute these in print, it is important to conserve space, and the number of columns far outstrips the number of rows for the schedule, so no spacing makes sense. Also, since they opt to not use a neutral background color (of white) for most of the row colors, it is actually less noisy to use a red column line than it would be to use white space between columns.
http://quince.infragistics.com/10vq
This example from Infragistics’ ASP.NET toolkit shows the use of alternating colors in a mail client sample.
http://quince.infragistics.com/10w2
This one shows how this pattern is baked into the Infragistics WPF grid.
http://quince.infragistics.com/118h
This is a nice, subtle yet effective use of alternating row colors in the iPhone Roambi data visualization tool
http://quince.infragistics.com/10xp
Jenifer Tidwell, Row Striping
Patterns in Interaction Design, Alternating Row Colors