interpolateColor method
Helper utility to interpolate between two discrete Color properties.
Implementation
Color interpolateColor(Color c1, Color c2, double t) {
t = t.clamp(0.0, 1.0);
final r = (c1.r + (c2.r - c1.r) * t).round();
final g = (c1.g + (c2.g - c1.g) * t).round();
final b = (c1.b + (c2.b - c1.b) * t).round();
return Color(r, g, b);
}