using color instead of fill_color with MathTeX for node labels#4501
Merged
behackl merged 4 commits intoManimCommunity:mainfrom Jan 25, 2026
Merged
using color instead of fill_color with MathTeX for node labels#4501behackl merged 4 commits intoManimCommunity:mainfrom
color instead of fill_color with MathTeX for node labels#4501behackl merged 4 commits intoManimCommunity:mainfrom
Conversation
for more information, see https://pre-commit.ci
behackl
approved these changes
Jan 25, 2026
Member
behackl
left a comment
There was a problem hiding this comment.
Thank you for contributing this fix! I've investigated and found that passing fill_color to MathTex objects doesn't work as expected — the class hierarchy doesn't properly propagate fill_color to the LaTeX-rendered submobjects. This is a separate underlying issue that we'll address in a future PR.
For now, your fix using color= instead of fill_color= is the correct approach. Using color is semantically more appropriate for text objects (you want to color the text, not fill a shape).
Happy to merge this as a targeted fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #4500
Overview: What does this pull request change?
Replaced
fill_color=withcolor=in allMathTex()calls throughout the codebaseMotivation and Explanation: Why and how do your changes improve the library?
Before:
MathTex("x^2", fill_color=BLACK)--> white textAfter:
MathTex("x^2", color=BLACK)--> black textwhite node labels on white node --> labels were not visible.
Links to added or changed documentation pages
https://manimce--4501.org.readthedocs.build/en/4501/reference/manim.mobject.graph.Graph.html -- here you can see the labels showing up in the examples (
LabeledModifiedGraphexample)Further Information and Comments
NA
Reviewer Checklist