I'm trying to bind a color value from a dataset tag to an object property in perspective.
But the datatypes do not seem to match.
i found a way that works but is strange. is there a better way?
I'm trying to bind a color value from a dataset tag to an object property in perspective.
But the datatypes do not seem to match.
i found a way that works but is strange. is there a better way?
I've had luck with the toColor function:
https://docs.inductiveautomation.com/display/DOC81/toColor
Edit:
Scratch that, I think that worked for Vision. Also, I misinterpreted how your data was stored (as a color object).
Not sure what your requirements are, but for Perspective it would simplify things if you were able to store your color as a string instead of a color object. For example "#FF000000". Then you wouldn't need a transform. I don't have any magic tricks for converting a color object to a string beyond what you have already done.
Note, in contrast having the data stored as a color object would be simpler for Vision (since Vision wants a color object).