# Cell coloring in Power table

**URL:** <https://forum.inductiveautomation.com/t/cell-coloring-in-power-table/37249>\
**Category:** Ignition\
**Created:** [July 31, 2020, 9:46am UTC](https://forum.inductiveautomation.com/t/cell-coloring-in-power-table/37249 "2020-07-31T09:46:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [July 31, 2020, 9:46am UTC](https://forum.inductiveautomation.com/t/cell-coloring-in-power-table/37249/1 "2020-07-31T09:46:41Z")

</div>

Hello,  
I need to color a cell based on its value.  
the code used is the following:

```auto
if colName == 'quality' and value != 'Good':
    return {'background': (255, 0, 0)}

```

the result I get is not what I expected:

 ![Captura de pantalla 2020-07-31 a las 11.45.59](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/6/466fc39a70e57e21ab7d769635cb601cf022c93b.png)

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [July 31, 2020, 10:54am UTC](https://forum.inductiveautomation.com/t/cell-coloring-in-power-table/37249/2 "2020-07-31T10:54:15Z")

</div>

Based on the values under the quality column it looks like this is a “qualified value” therefore the qualityCode is not a string datatype.

Try wrapping str() around value to see if that works.

---

<div class="post-metadata">

**Author:** ![lachguerabdallah](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lachguerabdallah/32/25558_2.png) [@lachguerabdallah](https://forum.inductiveautomation.com/u/lachguerabdallah)\
**Post date:** [July 31, 2020, 11:09am UTC](https://forum.inductiveautomation.com/t/cell-coloring-in-power-table/37249/3 "2020-07-31T11:09:46Z")

</div>

I have already found the solution.

the problem was that the quality column values ​​had a space at the beginning of the word.

thank you
