ColorOperatorsMethods extension

  • inverted, for returning -this
  • compareLuminance, for returning the brighter or darker Color utilizing >
  • or, for randomization by Color | List<Color>

The following methods resemble the operator counterparts but they have a slot for provision of a strength or alpha/opacity override (see alphaFromStrength for details):

  • add, to + one Color to another
  • subtract, to - one Color from another
  • average, to ~/ all channels of two Colors
on

Properties

inverted Color

Available on Color, provided by the ColorOperatorsMethods extension

Invert red, green and blue channels of this, maintaining alpha.
no setter

Methods

add(Color other, [dynamic strength]) Color

Available on Color, provided by the ColorOperatorsMethods extension

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.
average(Color other, [dynamic strength]) Color

Available on Color, provided by the ColorOperatorsMethods extension

Average the alpha, red, green, and blue channels of a Color with another other.
compareLuminance(Color other, {bool returnBrighter = true}) Color

Available on Color, provided by the ColorOperatorsMethods extension

Exposure method for > operator.
or(dynamic others) Color

Available on Color, provided by the ColorOperatorsMethods extension

Exposure method for | operator: random Color access.
subtract(Color other, [dynamic strength]) Color

Available on Color, provided by the ColorOperatorsMethods extension

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