# Cell Font color or Background Color

**URL:** <https://forum.inductiveautomation.com/t/cell-font-color-or-background-color/7776>\
**Category:** Ignition\
**Created:** [January 2, 2014, 6:36pm UTC](https://forum.inductiveautomation.com/t/cell-font-color-or-background-color/7776 "2014-01-02T18:36:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbackus](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tbackus/32/5091_2.png) [@tbackus](https://forum.inductiveautomation.com/u/tbackus)\
**Post date:** [January 2, 2014, 6:36pm UTC](https://forum.inductiveautomation.com/t/cell-font-color-or-background-color/7776/1 "2014-01-02T18:36:36Z")

</div>

I have a table of Values…  
Bolt1, Bolt2, Bolt3, Bolt4… Bolt50  
I need to compare EACH CELL to a Upper and Lower Limit defined per Row in a column USL and LSL

Is there a way in the displayed table to set each cell color to Red if cell \>= USL and Blue if cell \<= LSL??

Thanks

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [January 2, 2014, 7:34pm UTC](https://forum.inductiveautomation.com/t/cell-font-color-or-background-color/7776/2 "2014-01-02T19:34:35Z")

</div>

Yes,

Put this code in the getBackgroundAt Extension Function of the Table:

```auto
	colName = self.data.getColumnNames()[col]	
	if len(colName) <= 4 or colName[0:4] != "Bolt":		
		return defaultColor 
	if value >= self.data.getValueAt(row,"USL"):
		return "Red"
	elif value <= self.data.getValueAt(row,"LSL"):
		return "Blue"
	else: 
		return defaultColor	
```

Nick
