getColor function Null safety
Get the color with the given r
, g
, b
, and a
components.
The channel order of a uint32 encoded color is RGBA.
Implementation
int getColor(int r, int g, int b, [int a = 255]) =>
(clamp255(a) << 24) |
(clamp255(b) << 16) |
(clamp255(g) << 8) |
(clamp255(r));