darker method

  1. @override
Rgb darker([
  1. num k = 1
])
override

Returns a darker copy of this color.

If k is specified, it controls how much darker the returned color should be. If k is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space.

Implementation

@override
Rgb darker([num k = 1]) {
  k = math.pow(_darker, k);
  return Rgb(r * k, g * k, b * k, opacity);
}