# Cell Color in Perspective Table

**URL:** <https://forum.inductiveautomation.com/t/cell-color-in-perspective-table/50966>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 14, 2021, 6:04pm UTC](https://forum.inductiveautomation.com/t/cell-color-in-perspective-table/50966 "2021-09-14T18:04:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [September 15, 2021, 6:39am UTC](https://forum.inductiveautomation.com/t/cell-color-in-perspective-table/50966/3 "2021-09-15T06:39:34Z")

</div>

you'd have to put a transform script like this in the data prop

> [@Perspective table cell color](https://forum.inductiveautomation.com/t/perspective-table-cell-color/50047/5):
>
> Thanks for your help. That has cleaned up the code a little. I’ll work on sorting the key order in the json string later. output\_json = [] style\_red = {"backgroundColor": "red"} style\_green = {"backgroundColor": "green"} style\_gray = {"backgroundColor": "gray"} for row in range(value.getRowCount()): row\_object = {} for col in value.getColumnNames(): cell\_object = {} cell\_style = {} # Add a key/value pair for the cell cell\_object['value']=value.getValueAt(ro…

---

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