The constructor of UI\Draw\Color accepts int $rgba (usually written in hex format).
While I can get/set the separate channels and even directly access the properties (as they are public), I would also like to be able to get that int-value via a getter, and to be able to change it through a setter.
And if you're feeling really fancy you could even implement a __toString resulting in the rgba hex color code.
(I think I will implement all these (in userland) in Dynamic Components, but native would be even better.)
The constructor of
UI\Draw\Color
acceptsint $rgba
(usually written in hex format).While I can get/set the separate channels and even directly access the properties (as they are public), I would also like to be able to get that int-value via a getter, and to be able to change it through a setter.
And if you're feeling really fancy you could even implement a
__toString
resulting in the rgba hex color code.(I think I will implement all these (in userland) in Dynamic Components, but native would be even better.)