richest property

ColorModel richest
inherited

Returns the color with the highest combined saturation and brightness values.

Implementation

O get richest => colors.reduce((color1, color2) {
      final hsb1 = color1.toHsbColor();
      final hsb2 = color2.toHsbColor();

      final value1 = hsb1.saturation + hsb1.brightness;
      final value2 = hsb2.saturation + hsb2.brightness;

      return value1 < value2 ? color2 : color1;
    });