Pyx have a curve and its curve text have different colors

69 views Asked by At

Silly question but, I have the following pyx diagram:

enter image description here

I want the text in the edges to be black but the edges themselves to stay red.

This is my code:

   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)
        ])
1

There are 1 answers

0
Makogan On BEST ANSWER

Just figured it out:

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)
    ])