cancel
Showing results for 
Search instead for 
Did you mean: 

Color SVG light based on tag value

Former Member
0 Kudos

Hi all,

Been trying to color an SVG light basd on an input tag value. Know all the attributes to hit etc. Have been trying to use the calculated properties with the StringIf function (if tag == 0 , '#FFFFFF', '#000000') , passing a HTML color to the light > Fill property, doesn't seem to be working correctly. Should i pass a string ? Is it possible ?

Thanks,

Emmett

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Emmett

In the Calculated Property, did u set the variable "Light" (?) with Data Type as <b>Color?</b>

Regards

Som

Former Member
0 Kudos

Just figured it out - should be using " " around the HTML colour instead of ' '. Thanks all for your input

Former Member
0 Kudos

Sounds good.....i just tried it myself just now and it worked....was going to type the same exact thing to you!

just as a tip....next time when you have the Link Editor open, on the left side above the number pad is a field called Color....clicking it will give you a nifty little popup where you can pick any color you'd like and insert the code for it.

Former Member
0 Kudos

Thanks Alin,

Wouldn't really spot this unless you where actively looking for it.

Emmett

Answers (1)

Answers (1)

Former Member
0 Kudos

Emmet,

Which SVG object are you testing this one?..i would like to try to replicate it. I will post up the results.

Former Member
0 Kudos

Using the SVGLight object / Image to try and achieve this

Former Member
0 Kudos

I don't have that object in my standard xMII installed library. Is this a custom Object?

All i have is an object called IndicatorLight. Have you tried it with a different object to see if it works?

Former Member
0 Kudos

Apologies Indicator Light is the object - SVGLight is what i have been saving it as.