lerpTo method
List<RgbColor>
lerpTo(
- ColorModel color,
- int steps, {
- ColorSpace? colorSpace,
- 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<RgbColor> 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<RgbColor>((color) => color.cast())
.toList();
}