operator - method

Color operator -(
  1. Color other
)

Implementation

Color operator -(Color other) {
  return Color(
      max(red - other.red, 0),
      max(green - other.green, 0),
      max(blue - other.blue, 0),
      alpha == null
          ? alpha
          : max(alpha! - (other.alpha == null ? 1.0 : other.alpha!), 0.0));
}