My Javascript function changes hex values to rgb like so:
localVars.gotColour = hexToRgb("#bceadf");
The function is returning an object which contains rgb values like so.
But how do I get theses into the event sheet as something useable? The gotColour variable is an object with the 3 variables inside, but I cant seem to use it for anything useful. (apart from printing object r:12, g:34 b:34 to the console)
I would have expected I could do something like the following in the event sheet after the function had been run:
Set Colour to gotColour //does nothing
.or this..
Set Colour to rgbEx255(gotColour[0],gotColour[1],gotColour[2]) //bad syntax
..but those do nothing....
I guess I could write 3 different functions to each get the r,g,b values individually but that seems very messy.
Any tips?