# Perspective table cell color

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-cell-color/50047>\
**Category:** Ignition\
**Created:** [August 18, 2021, 1:58pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-color/50047 "2021-08-18T13:58:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [August 18, 2021, 2:52pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-color/50047/4 "2021-08-18T14:52:45Z")

</div>

it might be easier to use “getColumnNames()” instead of “getColumnCount()”, so you dont have to worry about sorting indexes

this:

```auto
for col in value.getColumnNames():
....
if col == 'LED':
...
row_object[col]=cell_object

```

instead of:

```auto
for col in range(value.getColumnCount()):
...
value.getColumnName(col) == 'LED'
...
row_object[value.getColumnName(col)]=cell_object

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspective-table-cell-color/50047)._
