Loading...
Logo
Processing Forum
Hi,

I'm trying to create a color variable using a hex value. I've downloaded a hex value from an RSS feed in string format. I'm struggling converting the string hex into a usable color variable. I've tried a few different attempts but struggle inserting the hash symbol infront of the hex value.

Any thoughts?

Thanks

Dan

Replies(2)


 Any thoughts?
Check the Reference?  Search the forum?

See unhex().  Notice from the example that for a colour your hex number should include values for the alpha channel, as was pointed out in a very recent post on the forum...

Note that inserting a hash wouldn't have done anything, as this symbol is interpreted at compilation phase, not at runtime phase.