# Perspective Table Dynamic Highlight

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-dynamic-highlight/85259>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [February 5, 2024, 9:06pm UTC](https://forum.inductiveautomation.com/t/perspective-table-dynamic-highlight/85259 "2024-02-05T21:06:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [February 5, 2024, 9:06pm UTC](https://forum.inductiveautomation.com/t/perspective-table-dynamic-highlight/85259/1 "2024-02-05T21:06:36Z")

</div>

Is there a way to dynamically change the highlight color of a Perspective table?  
I can change my row color, but when a user hovers over a row it only highlights blue on the columns I have not assigned color to. I think it would look cool if I could have the green rows become a darker green and the orange rows become slightly darker.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/c/5caa5147c9b97a175774d3f1cd5bf3ae057c04a0.png)

---

<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:** [February 6, 2024, 8:14am UTC](https://forum.inductiveautomation.com/t/perspective-table-dynamic-highlight/85259/2 "2024-02-06T08:14:16Z")

</div>

The background colors do seem to overwrite eachother, but you could add a filter instead

try putting this in the advanced stylesheet

```auto
.ia_tableComponent __body__ row--hovered{
	filter: contrast(2)
}

```

or

```auto
.ia_tableComponent __body__ row--hovered{
	filter: brightness(0.5)
}

```

you'll have to play a bit with the filters till you find something you like,  
brightness works pretty good if you use light colors as base

---

<div class="post-metadata">

**Author:** ![Zachary\_Kacel1](https://avatars.discourse-cdn.com/v4/letter/z/ea666f/32.png) [@Zachary\_Kacel1](https://forum.inductiveautomation.com/u/Zachary_Kacel1)\
**Post date:** [February 6, 2024, 1:59pm UTC](https://forum.inductiveautomation.com/t/perspective-table-dynamic-highlight/85259/3 "2024-02-06T13:59:07Z")

</div>

Using the advanced stylesheet worked amazingly well! I liked using the contrast one over the brightness.

I did need to make a change for it to work. This is probably due to me not knowing much about the advanced stylesheet or CSS but here is the code that worked for me. I assigned it to the style of the row component.

```auto
.psc-TableRowHightlight:hover {
 filter: contrast(1.25)
}

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/1/91938cd04a5ae9c2eff7725a8e3ec080f7c95a22.png)
