# Using styles in a script transform?

**URL:** <https://forum.inductiveautomation.com/t/using-styles-in-a-script-transform/54942>\
**Category:** Ignition\
**Tags:** perspective, ignition80\
**Created:** [January 12, 2022, 6:44pm UTC](https://forum.inductiveautomation.com/t/using-styles-in-a-script-transform/54942 "2022-01-12T18:44:42Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [January 12, 2022, 8:40pm UTC](https://forum.inductiveautomation.com/t/using-styles-in-a-script-transform/54942/9 "2022-01-12T20:40:11Z")

</div>

Hi @bkarabinchak.psi, the others are correct, but for further context this may help: [Changing colour of row based off value in cell in perspective table - #17 by cmallonee](https://forum.inductiveautomation.com/t/changing-colour-of-row-based-off-value-in-cell-in-perspective-table/43587/17)

The only difference is that instead of defining `"style":{"backgroundColor":"#000000"}` you would use `"style":{"classes":"BadRecordCount"}` as @Arnaud_Declerck has eluded.

To do this you will need to iterate through your data binding and create the appropriate structure, with the logic in place to assign the appropriate style class.

---

_[View the full topic](https://forum.inductiveautomation.com/t/using-styles-in-a-script-transform/54942)._
