Challenge
How do I get from (255, 255, 255, 0)
to '(255, 255, 255, 0)'
when the former is a tuple?
Details:
I'm converting hex colors to rgba colors using an approach described here. I'm doing this to use the color as arguments with an opacity element like so:
color = 'rgba(255, 255, 255, 0)'
As you might already have guessed, the argument has to be of a string
type.
And I've come so far as having the integers in a tuple like so
(255, 255, 255, 0)
Now I need to enclose the whole tuple in a string like '(255, 255, 255, 0)'
to get to my last step:
'rgba(255, 255, 255, 0)'
I'm afraid I'm missing some obvious and very fundamental element of Python here, but any suggestions would be great!