Make sure RGB list is converted to RGBA

What's the most Snap!pish way to ensure that RGB / RGBA lists always end up as RGBA lists?

image

I can do it industrially like this

costumeFromTextUsingMatrixFont27Sep2024 script pic (4)

costumeFromTextUsingMatrixFont27Sep2024 script pic (2)

but feel there should be a better way

I've come up with this so far
costumeFromTextUsingMatrixFont27Sep2024 script pic (6)
costumeFromTextUsingMatrixFont27Sep2024 script pic (5)

What's wrong with the simplest


or

normalized (rgb)A


For a very large pixel array, "columns" may be faster than "map" of every element.
Untitled script pic - 2024-09-26T181145.130

Sorry - I just need it for the simple 1 pixel list of values - not needing to map over a list of pixels

As performance is a non-issue, the question is, whatever you find a more Snap!pish ...
Untitled script pic - 2024-09-26T185155.818
Untitled script pic - 2024-09-26T185325.914
or
Untitled script pic - 2024-09-26T184752.760

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.