I'm sure the answer is somewhere online, but I'm wording it wrong and nothing comes up.
Anyone know how I could take a function like: book.set_colour_RGB(0x21, 251, 228, 228)
which requires 3 arguments for R,G and B, and instead use an array RGB=[251,228,228]
, so that the function would become:
book.set_colour_RGB(0x21, x(RGB))
where x is a mystery function I'm looking for that knows to use 3 arguments because the length of RGB is 3.
I get in this case I could use book.set_colour_RGB(0x21, RGB[0],RGB[1],RGB[2])
and it really wouldn't be that difficult. But I was just curious if there was a way to make it tidier and easier to use, particularly for functions with many more arguments.
Thanks peeps.