# Color palette in a power table

**URL:** <https://forum.inductiveautomation.com/t/color-palette-in-a-power-table/26893>\
**Category:** Ignition\
**Created:** [July 25, 2019, 7:37pm UTC](https://forum.inductiveautomation.com/t/color-palette-in-a-power-table/26893 "2019-07-25T19:37:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chasondeshotel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chasondeshotel/32/20032_2.png) [@chasondeshotel](https://forum.inductiveautomation.com/u/chasondeshotel)\
**Post date:** [July 25, 2019, 7:37pm UTC](https://forum.inductiveautomation.com/t/color-palette-in-a-power-table/26893/1 "2019-07-25T19:37:06Z")

</div>

Hello,

I’m trying to get a color palette to update cells in a power table, but I’m unable to get it to populate with the current cell’s value, the color editor pulls up with white as the default every time, so cancelling or hitting escape doesn’t work as expected

I’m using `return {'editor' : ColorEditor.createTableCellEditor() }` inside of the `configureEditor` portion of the power table

I’ve tried to set the default color on the `ColorEditor` object with no luck,

```auto
from java.awt import Color
color = Color(0,0,0,255)
colorEditor = ColorEditor()
colorEditor.setSelectedColor(color)
colorEditor = colorEditor.createTableCellEditor()
return {'editor' : ColorEditor.createTableCellEditor()}

```

I was also messing around with `ColorEditor.createTableCellRenderer()` inside of `configureCell`, but that doesn’t work at all, I tried:

`return {'renderer' : ColorEditor.createTableCellRenderer()}`

So… who knows the trick?

Thanks

---

<div class="post-metadata">

**Author:** ![w.mandelli](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@w.mandelli](https://forum.inductiveautomation.com/u/w.mandelli)\
**Post date:** [February 12, 2021, 2:37am UTC](https://forum.inductiveautomation.com/t/color-palette-in-a-power-table/26893/3 "2021-02-12T02:37:16Z")

</div>

I could get it working with this code in the “initialize” function:  
from com.inductiveautomation.ignition.client.util.gui.color import ColorEditor  
return {‘renderer’ : ColorEditor.createTableCellRenderer()}

and the following code in the “configureEditor” function:  
if colName == “myColName”:  
from com.inductiveautomation.ignition.client.util.gui.color import ColorEditor  
return {‘editor’ : ColorEditor.createTableCellEditor()}
