Changing color of label in Sitemaps based on ECSMA/Javascript Transformation

Hi all,
I like to change the background color of some value using a Javascript calculation alike this snippet:

Transformation : Time2Color

(function(data) {
var returnValue = SomeCondition ? ‘red’ : ‘green’;
return returnValue
})(input)

What is the syntax to reference that in sitemaps ? config:js:Time2Color ?

I know about the simple coloring syntax: e.g. Text item=some Item valuecolor=[OPEN=“green”, CLOSED=“red”]

But how to reference that in sitemaps … Text item=some Item valuecolor=???

Thx for any hint
Gerry

Sitemaps do not support JS transformations except on the Item label and even there it’s limited to transforming the state of the Item. You cannot use a transformation nor a function nor any other JS to select the color. Sitemaps | openHAB is the sum total of what’s available to you in sitemaps concerning color.

Thanks Rich,

for the fast and precise answer !