setAlpha function

int setAlpha(
  1. int color,
  2. int value
)

Returns a new color where the alpha channel of color has been replaced by value.

Implementation

int setAlpha(int color, int value) =>
    (color & 0x00ffffff) | (clamp255(value) << 24);