shiftColor static method

Color shiftColor(
  1. Color color,
  2. int shift
)

Implementation

static Color shiftColor(Color color, int shift) {
  return Color.fromRGBO(
    math.max(color.red + shift, 0),
    math.max(color.green + shift, 0),
    math.max(color.blue + shift, 0),
    1,
  );
}