lerpTo method

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

Returns the interpolated steps between this color and color.

The returned Color's values will be interpolated in this color's color space.

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

List<Color> lerpTo(
  Color color,
  int steps, {
  ColorSpace? colorSpace,
  bool excludeOriginalColors = false,
}) {
  assert(steps > 0);
  return toRgbColor().lerpTo(color.toRgbColor(), steps,
      colorSpace: colorSpace, excludeOriginalColors: excludeOriginalColors);
}