lerpColor function
Interpolates two nullable Color values.
A null side is treated as absent, not as transparent: fading an unset colour through transparency would show a ghost of the wrong colour.
Implementation
Color? lerpColor(Color? a, Color? b, double t) {
if (a == null || b == null) return lerpDiscrete(a, b, t);
return Color.lerp(a, b, t);
}