If I want to apply a color to some element, can I modify only one of its color properties? E.g. it might have RGB color
(r, g, b)
, and I only want to set
a = 0.3
. Is there a way to simply set A, without changing RGB?
(Or, more advanced, is there a way to transform RGBA by multiplying it with a vector of RGBA factors? For example, to reduce alpha to 30% of its current value, I'd multiply by [1, 1, 1, 0.3].)