def blend_color(a, b, ratio) -> tuple:
    """Blends and returns the mix of colors a and b to a given ratio.

    Note: ratio argument must be a 3-float sequence."""
    return (
        int(a[0] + (b[0] - a[0]) * ratio[0]),
        int(a[1] + (b[1] - a[1]) * ratio[1]),
        int(a[2] + (b[2] - a[2]) * ratio[2])
    )