# Change gradient color step in expression

**URL:** <https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215>\
**Category:** Ignition\
**Created:** [September 12, 2019, 3:30pm UTC](https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215 "2019-09-12T15:30:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 12, 2019, 3:30pm UTC](https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215/1 "2019-09-12T15:30:06Z")

</div>

Hi  
I want to change fill color of vector object in expression. The problem is the color is gradient in 3 step and I don’t know how to set new gradient color for each step by using expression language.  
Is this possible?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 12, 2019, 5:19pm UTC](https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215/2 "2019-09-12T17:19:55Z")

</div>

Is this what you are looking for?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a0069e8498cd8e4f71a555c313884c6ae38dd859.png)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 12, 2019, 5:33pm UTC](https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215/3 "2019-09-12T17:33:15Z")

</div>

No this function mix two color

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 12, 2019, 5:35pm UTC](https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215/4 "2019-09-12T17:35:19Z")

</div>

There’s no way to modify an actual gradient object with expressions. You’ll need to use scripting.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [September 12, 2019, 5:49pm UTC](https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215/5 "2019-09-12T17:49:38Z")

</div>

Can you guide how to do that?  
I’m not Java programmer and I need example for that

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 12, 2019, 5:57pm UTC](https://forum.inductiveautomation.com/t/change-gradient-color-step-in-expression/28215/6 "2019-09-12T17:57:09Z")

</div>

Could you cut your vector graphic in half, group it, then use the gradient expression function on each half to get the desired effect? Not sure if that would be easier than the scripting method, but might be an option.
