Thanks @Dancergraham and @chanley!
If you’re interested in a Python method that lerps two colours, in order to find a third one inbetween, check this out:
def lerp(start, stop, amt):
"""Calculates a number between two numbers at a specific increment.
The amt parameter is the amount to interpolate between the two values,
where 0.0 is equal to the first point, 0.1 is very near the first point,
0.5 is half-way in between, and 1.0 is equal to the second point.
If the value of amt is more than 1.0 or less than 0.0, the number will be
calculated accordingly in the ratio of the given numbers.
start: First value (number).
stop: Second value (number).
amt: Amount to interpolate (number).
The lerped value.
return amt * (stop - start) + start
def lerp_color(c1, c2, amt):
"""Blends two colors to find a third color somewhere between them.
c1: ARGB Color to interpolate from.
c2: ARGB Color to interpolate to.
amt: Number between 0 and 1.
The lerped ARGB Color.
amt = max(min(amt, 1), 0) # prevent extrapolation
# Perfom interpolation
l0 = lerp(c1.A, c2.A, amt)
l1 = lerp(c1.R, c2.R, amt)
l2 = lerp(c1.G, c2.G, amt)
l3 = lerp(c1.B, c2.B, amt)
return Color.FromArgb(l0, l1, l2, l3)