add method Null safety

Color add(
  1. Color other,
  2. [dynamic strength]

Add the red, green, and blue channels of other with those of this Color. The resultant alpha is maintained from this, unless a strength would be specified which is used instead.

See alphaFromStrength for details on using a value between 0..1 or 2..255 as a shortcut for specifying alpha/opacity override.

Exposure method for + operator, providing strength.


Color add(Color other, [dynamic strength]) =>
    withAlpha(alphaFromStrength(strength) ?? alpha) + other;