# Table column dynamic backgroundColor

**URL:** <https://forum.inductiveautomation.com/t/table-column-dynamic-backgroundcolor/112671>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 8, 2025, 2:42am UTC](https://forum.inductiveautomation.com/t/table-column-dynamic-backgroundcolor/112671 "2025-12-08T02:42:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgauvey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bgauvey/32/81947_2.png) [@bgauvey](https://forum.inductiveautomation.com/u/bgauvey)\
**Post date:** [December 8, 2025, 2:42am UTC](https://forum.inductiveautomation.com/t/table-column-dynamic-backgroundcolor/112671/1 "2025-12-08T02:42:30Z")

</div>

I have a perspective table that is bound to a JSON array. Of the several fields, I am binding stateDescription, I need to set the background color of this column for each row. There is a stateColor field which is a number that can be easily converted to hex code with a script. My question is how do I access the color column during the table binding so that each row can be set.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [December 8, 2025, 2:48am UTC](https://forum.inductiveautomation.com/t/table-column-dynamic-backgroundcolor/112671/2 "2025-12-08T02:48:04Z")

</div>

Write a script transform that takes the JSON array and generates a new array in the same format with the required style elements using a `for` loop.

```python
city: {
   value: 'Folsom',
   editable: true,
   style: {
     backgroundColor: '#DADDE0',
     classes: [] |''
   }
} 

```

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [December 8, 2025, 2:49am UTC](https://forum.inductiveautomation.com/t/table-column-dynamic-backgroundcolor/112671/3 "2025-12-08T02:49:08Z")

</div>

I'm not sure what you mean by "color column," but this guide helped me. You might need to modify the JSON structure.

[Styling Rows Based on Values | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-table/styling-rows)
