setGreen function

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

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

Implementation

int setGreen(int color, int value) =>
    (color & 0xffff00ff) | (clamp255(value) << 8);