Pyx 有一条曲线,它的曲线文本有不同的颜色

Pyx have a curve and its curve text have different colors

愚蠢的问题但是,我有以下 pyx 图:

我希望边缘的文本为黑色,但边缘本身保持红色。

这是我的代码:

   c.stroke(path.line(p1[0], p1[1], p2[0], p2[1]),
        [
            style.linecap.round, color.rgb(tcolor[0], tcolor[1], tcolor[2]),
            deco.curvedtext(f"\huge{{{label}}}", textattrs=[text.halign.center],
            exclude=0.1)
        ])

刚弄明白:

c.stroke(path.line(p1[0], p1[1], p2[0], p2[1]),
    [
        style.linecap.round, color.rgb(tcolor[0], tcolor[1], tcolor[2]),
        deco.curvedtext(f"\huge{{{label}}}", textattrs=[text.halign.center, color.rgb.black],
        exclude=0.1)
    ])