# Pipes and Color()

**URL:** <https://forum.inductiveautomation.com/t/pipes-and-color/86244>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 23, 2024, 8:42am UTC](https://forum.inductiveautomation.com/t/pipes-and-color/86244 "2024-02-23T08:42:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![damien.cacheux](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@damien.cacheux](https://forum.inductiveautomation.com/u/damien.cacheux)\
**Post date:** [February 23, 2024, 8:42am UTC](https://forum.inductiveautomation.com/t/pipes-and-color/86244/1 "2024-02-23T08:42:29Z")

</div>

I'd like to change the color of the pipes on a case-by-case, so I tried using Color() in an expression linked to the fill property.  
This doesn't work as expected. In the property editor, the color is red, in the work windows the pipe is green (as set manually before the bind)..... and in the web viewer the pipe is gray as default....

Could someone please explain my error?

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

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 23, 2024, 8:54am UTC](https://forum.inductiveautomation.com/t/pipes-and-color/86244/2 "2024-02-23T08:54:12Z")

</div>

I don't think perspective uses java colors anywhere.  
Try with "red" instead, or an hexadecimal color code if you want more control.

edit: Or probably anything that css can interpret as a color.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 23, 2024, 9:46am UTC](https://forum.inductiveautomation.com/t/pipes-and-color/86244/3 "2024-02-23T09:46:59Z")

</div>

@pascal.fragnoud is correct. The [color()](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/colors/color) Expression Function doc page says,

> NOTE  
> This function was designed to return color objects to **Vision** bindings, and **will not work with Perspective bindings**. Instead, Perspective color properties can simply use string hex codes to derive a color from a binding, for example: "#00FF00".

---

<div class="post-metadata">

**Author:** ![damien.cacheux](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@damien.cacheux](https://forum.inductiveautomation.com/u/damien.cacheux)\
**Post date:** [February 29, 2024, 8:02am UTC](https://forum.inductiveautomation.com/t/pipes-and-color/86244/4 "2024-02-29T08:02:40Z")

</div>

Thx for your support  
I did with strings
