setRed function

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

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

Implementation

int setRed(int color, int value) => (color & 0xffffff00) | (clamp255(value));