def _curve_color(idx):
    """Return a unique color for the given idx (if idx < distinct_colors)."""
    colors = [
        (0, .8, .8),  # cyan
        (1, 0, 1),    # violet
        (0, .8, 0),   # green
        (0, 0, .8),   # blue
        (1, .5, 0),   # orange
        (1, 0, 0),    # red
    ]
    return colors[idx % len(colors)]