lerpTo method

  1. @override
List<CmykColor> lerpTo(
  1. ColorModel color,
  2. int steps, {
  3. ColorSpace? colorSpace,
  4. bool excludeOriginalColors = false,
})

Returns the interpolated steps between this color and color.

The returned ColorModel's values will be interpolated in the color space defined by colorSpace, or in the color space of this color if colorSpace is null.

If excludeOriginalColors is false, this color and color will not be included in the list. If color is in a different color space, it will be converted to this color's color space.

Implementation

@override
List<CmykColor> lerpTo(
  cm.ColorModel color,
  int steps, {
  cm.ColorSpace? colorSpace,
  bool excludeOriginalColors = false,
}) {
  assert(steps > 0);
  return super
      .lerpTo(color, steps,
          colorSpace: colorSpace,
          excludeOriginalColors: excludeOriginalColors)
      .map<CmykColor>((color) => color.cast())
      .toList();
}