Template talk:IE

Is there a more elegant way to change the background for certain cells? I want to change the background for some cells from column 3, sometimes to color A and sometimes to color B. I've set the default background color to white in the template and I'm defining the 2 colors in the tables whenever I want to use them but I have the feeling that there is a better way to do this.

Example with placeholder colors: