using color instead of fill_color with MathTeX for node labels (#4501)

* fill_color --> color for MathTeX

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
This commit is contained in:
Aditi Juneja 2026-01-25 16:23:05 +05:30 committed by GitHub
commit eca7f17853
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -588,9 +588,7 @@ class GenericGraph(VMobject, metaclass=ConvertToOpenGL):
self._labels = labels
elif isinstance(labels, bool):
if labels:
self._labels = {
v: MathTex(v, fill_color=label_fill_color) for v in vertices
}
self._labels = {v: MathTex(v, color=label_fill_color) for v in vertices}
else:
self._labels = {}
@ -697,7 +695,7 @@ class GenericGraph(VMobject, metaclass=ConvertToOpenGL):
)
if label is True:
label = MathTex(vertex, fill_color=label_fill_color)
label = MathTex(vertex, color=label_fill_color)
elif vertex in self._labels:
label = self._labels[vertex]
elif not isinstance(label, (Mobject, OpenGLMobject)):