# Change color of value in perspective

**URL:** <https://forum.inductiveautomation.com/t/change-color-of-value-in-perspective/51507>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [September 30, 2021, 6:01pm UTC](https://forum.inductiveautomation.com/t/change-color-of-value-in-perspective/51507 "2021-09-30T18:01:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 30, 2021, 6:03pm UTC](https://forum.inductiveautomation.com/t/change-color-of-value-in-perspective/51507/2 "2021-09-30T18:03:39Z")

</div>

The color expression returns a Java color, not a web-useful color (for now). What we'll probably eventually do is make the function smarter. In the meantime, you can use a transform to manipulate the color into the right format:

> [@\[IGN-1566\] Perspective - Color function not returning a usable value](https://forum.inductiveautomation.com/t/bug-11732-perspective-color-function-not-returning-a-usable-value/21001/4):
>
> As a workaround, you can add a transform if you need to use color(): colorIn = value hexVal = '#' + hex(colorIn.getRed()\*65536 + colorIn.getGreen()\*256 + colorIn.getBlue())[2:] return hexVal

---

_[View the full topic](https://forum.inductiveautomation.com/t/change-color-of-value-in-perspective/51507)._
