operator ~/ method

Color operator ~/(
  1. Color other
)

Color Average Operator

Average the alpha, red, green, and blue channels of a Color with another other.

Implementation

Color operator ~/(Color other) => Color.fromARGB(
      ((alpha + other.alpha) ~/ 2).restricted,
      ((red + other.red) ~/ 2).restricted,
      ((green + other.green) ~/ 2).restricted,
      ((blue + other.blue) ~/ 2).restricted,
    );