hoverOf static method

Color hoverOf(
  1. Color color,
  2. double value,
  3. double percent
)

Returns the color that is converted to the hover color.

Implementation

static Color hoverOf(Color color, double value, double percent) {
    return HSLColor.fromColor(color).lightness > 0.9
        ? darken(color, percent * value)
        : lighten(color, percent * value);
}