# How to convert RGB color to HEX for binding

**URL:** <https://forum.inductiveautomation.com/t/how-to-convert-rgb-color-to-hex-for-binding/53887>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 8, 2021, 1:29pm UTC](https://forum.inductiveautomation.com/t/how-to-convert-rgb-color-to-hex-for-binding/53887 "2021-12-08T13:29:28Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 8, 2021, 1:38pm UTC](https://forum.inductiveautomation.com/t/how-to-convert-rgb-color-to-hex-for-binding/53887/3 "2021-12-08T13:38:25Z")

</div>

> [@Perspective Dynamic Button COLOR](https://forum.inductiveautomation.com/t/perspective-dynamic-button-color/52271):
>
> I am having a hard time finding out why when i apply an expression to background color element it will change in the preview on property editor but not in the view itself. Expression : gradient(toStr(tag("[default]" + "Flat Sorter Collector/OUTERBELT SLUG FINDER/GANTRY 1/TRK\_FILES/U180400\_Gantry\_Sensor\_2/" + {this.meta.name} +"\_")), {[default]Flat Sorter Collector/OUTERBELT SLUG FINDER/GANTRY\_LIMIT.value}, {[default]Flat Sorter Collector/OUTERBELT SLUG FINDER/GANTRY\_HEIGHT.value}, toColor("oran…

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-convert-rgb-color-to-hex-for-binding/53887)._
